diff --git a/JOBot.Backend/Infrastructure/Config/RabbitQueues.cs b/JOBot.Backend/Infrastructure/Config/RabbitQueues.cs new file mode 100644 index 0000000..cc8de04 --- /dev/null +++ b/JOBot.Backend/Infrastructure/Config/RabbitQueues.cs @@ -0,0 +1,6 @@ +namespace JOBot.Backend.Infrastructure.Config; + +public static class RabbitQueues +{ + public const string AuthQueue = "auth"; +} \ No newline at end of file diff --git a/JOBot.Backend/Program.cs b/JOBot.Backend/Program.cs index 95467a3..6e070ab 100644 --- a/JOBot.Backend/Program.cs +++ b/JOBot.Backend/Program.cs @@ -4,7 +4,7 @@ var builder = WebApplication.CreateBuilder(args); var startup = new Startup(builder.Configuration); -startup.ConfigureServices(builder.Services); +await startup.ConfigureServices(builder.Services); var app = builder.Build(); startup.Configure(app, app.Environment); diff --git a/JOBot.Backend/Services/HeadHunterService.cs b/JOBot.Backend/Services/HeadHunterService.cs index e89ce38..3e67879 100644 --- a/JOBot.Backend/Services/HeadHunterService.cs +++ b/JOBot.Backend/Services/HeadHunterService.cs @@ -1,14 +1,19 @@ +using System.Text; using System.Text.Json; -using System.Web; using JOBot.Backend.DAL.Context; using JOBot.Backend.DTOs.HeadHunterHook; using JOBot.Backend.Infrastructure.Config; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Options; +using RabbitMQ.Client; namespace JOBot.Backend.Services; -public class HeadHunterService(ILogger logger, IOptions config, AppDbContext dbContext) +public class HeadHunterService( + IChannel channel, + ILogger logger, + IOptions config, + AppDbContext dbContext) { private readonly HeadHunterConfig _config = config.Value; @@ -88,6 +93,14 @@ public class HeadHunterService(ILogger logger, IOptions(options => options.UseNpgsql(Configuration.GetConnectionString("PostgreSQL")));