Admin controller, Locations controller, requests to add available countries, request to get available countries

This commit is contained in:
2024-08-17 21:30:51 +03:00
parent 7cbe3d9698
commit 3cb2083222
59 changed files with 477 additions and 167 deletions

View File

@@ -1,5 +1,7 @@
using ApplicationLayer.AuthServices.LoginService;
using ApplicationLayer.AuthServices.RegisterService;
using ApplicationLayer.DataAccessingServices.AuthServices.LoginService;
using ApplicationLayer.DataAccessingServices.AuthServices.RegisterService;
using ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.AdminRequests;
using ApplicationLayer.DataAccessingServices.Locations.RequestHandlers.ApplicantRequests;
using ApplicationLayer.DataAccessingServices.VisaApplications.Handlers;
using Microsoft.Extensions.DependencyInjection;
@@ -9,12 +11,22 @@ namespace ApplicationLayer;
public static class DependencyInjection
{
/// Add services for Application layer
public static IServiceCollection AddApplicationLayer(this IServiceCollection services)
public static IServiceCollection AddApplicationLayer(this IServiceCollection services, bool isDevelopment = false)
{
services.AddScoped<IVisaApplicationsRequestHandler, VisaApplicationRequestsHandler>();
services.AddScoped<IVisaApplicationRequestsHandler, VisaApplicationRequestsHandler>();
services.AddScoped<ILocationRequestsHandler, LocationRequestsHandler>();
services.AddScoped<IEditLocationsRequestsHandler, EditLocationsRequestsHandler>();
services.AddScoped<IRegisterService, RegisterService>();
services.AddScoped<ILoginService, LoginService>();
if (isDevelopment)
{
services.AddScoped<ILoginService, DevelopmentLoginService>();
}
else
{
services.AddScoped<ILoginService, LoginService>();
}
return services;
}