feat: added auth hook using RabbitMQ on client for login continue
This commit is contained in:
@@ -2,6 +2,7 @@ using JOBot.Backend.DAL.Context;
|
||||
using JOBot.Backend.Infrastructure.Config;
|
||||
using JOBot.Backend.Services;
|
||||
using JOBot.Backend.Services.gRPC;
|
||||
using JOBot.Infrastructure.Config;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using RabbitMQ.Client;
|
||||
|
||||
@@ -22,8 +23,13 @@ public class Startup(IConfiguration configuration)
|
||||
{
|
||||
HostName = "jobot-rabbitmq"
|
||||
}.CreateConnectionAsync();
|
||||
await using var channel = await rabbitMqConnection.CreateChannelAsync();
|
||||
await channel.QueueDeclareAsync(RabbitQueues.AuthQueue, false, false, false);
|
||||
var channel = await rabbitMqConnection.CreateChannelAsync();
|
||||
await channel.QueueDeclareAsync(
|
||||
RabbitQueues.AuthQueue,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
arguments: null);
|
||||
services.AddSingleton(channel);
|
||||
|
||||
services.AddDbContext<AppDbContext>(options =>
|
||||
|
||||
Reference in New Issue
Block a user