feat: added implementation of HeadHunter hook for user registration
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
using JOBot.Backend.DAL.Context;
|
||||
using JOBot.Backend.Infrastructure.Config;
|
||||
using JOBot.Backend.Services;
|
||||
using JOBot.Backend.Services.gRPC;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace JOBot.Backend;
|
||||
|
||||
public class Startup
|
||||
public class Startup(IConfiguration configuration)
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
private IConfiguration Configuration { get; } = configuration;
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddGrpc();
|
||||
services.AddGrpcReflection();
|
||||
services.AddControllers();
|
||||
services.AddLogging();
|
||||
|
||||
services.AddDbContext<AppDbContext>(options =>
|
||||
options.UseNpgsql(Configuration.GetConnectionString("PostgreSQL")));
|
||||
|
||||
services.Configure<HeadHunterConfig>(Configuration.GetSection(HeadHunterConfig.SectionName));
|
||||
|
||||
services.AddScoped<HeadHunterService>();
|
||||
}
|
||||
|
||||
public void Configure(WebApplication app, IWebHostEnvironment env)
|
||||
{
|
||||
app.MapGrpcReflectionService().AllowAnonymous();
|
||||
app.MapGrpcService<UserService>();
|
||||
app.MapControllers();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user