Skip to content

Commit

Permalink
Rename project & refactor logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ju4n97 committed Apr 28, 2022
1 parent aaedbbb commit 006d79e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Ekisa.Chatbots.Listener ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

Expand All @@ -41,5 +41,5 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./kibot-x64.zip
asset_name: kibot_${{ github.event.release.tag_name }}_listener-x64.zip
asset_name: kibotlistener_${{ github.event.release.tag_name }}-x64.zip
asset_content_type: application/zip
14 changes: 0 additions & 14 deletions Ekisa.Chatbots.Listener/Models/ListaCitas.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ekisa.Chatbots.Listener", "Ekisa.Chatbots.Listener\Ekisa.Chatbots.Listener.csproj", "{9D3B306A-1FDC-40CD-B972-036F641E5507}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kibot.Appointment.Listener", "Kibot.Appointment.Listener\Kibot.Appointment.Listener.csproj", "{9D3B306A-1FDC-40CD-B972-036F641E5507}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ekisa.ChatBot.Client.Models
namespace Kibot.Appointment.Listener.Models
{
public class ChatBotCita
public class ChatbotCita
{
public int Id { get; set; }
public short? IdCliente { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions Kibot.Appointment.Listener/Models/ListaCitas.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Kibot.Appointment.Listener.Models
{
public class ListaCitas
{
public string Citas { get; set; }
public int IdCliente { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Ekisa.ChatBot.Client.Models;
using Kibot.Appointment.Listener.Models;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
Expand All @@ -9,7 +9,7 @@
using System.IO;
using System.Linq;

namespace Ekisa.Chatbots.Listener
namespace Kibot.Appointment.Listener
{
public class Program
{
Expand Down Expand Up @@ -41,15 +41,17 @@ private static void ConnectHub()
}
else
{
Console.WriteLine("SignalR connection established");
Console.WriteLine($"Client: {_clientId}");
Console.WriteLine("Connection established");
Console.WriteLine($"Listening events from {_hubAddress}\n");
}
}).Wait();

connection.On<string>("received", citasRecibidas =>
{
var citas = JsonConvert.DeserializeObject<List<ChatBotCita>>(citasRecibidas);
var citas = JsonConvert.DeserializeObject<List<ChatbotCita>>(citasRecibidas);
var citasCliente = citas.Where(x => x.IdCliente == _clientId).ToList();
Console.WriteLine($"Citas recibidas: {citasCliente.Count}");
Console.WriteLine($"Citas: {citasCliente.Count}");

foreach (var cita in citasCliente)
{
Expand All @@ -66,7 +68,7 @@ private static void ConnectHub()
}
}

static void ActualizarCita(ChatBotCita cita)
static void ActualizarCita(ChatbotCita cita)
{
try
{
Expand Down
File renamed without changes.

0 comments on commit 006d79e

Please sign in to comment.