finalizare 1.0
This commit is contained in:
@@ -3,7 +3,8 @@ using Application.Services.Database.PostgreSQL;
|
||||
using Application.Services.Email;
|
||||
using Application.Services.HashingAlgorithms;
|
||||
using Application.Services.Jwt;
|
||||
using Infrastructure.Data;
|
||||
using Infrastructure.BackgroundServices;
|
||||
using Infrastructure.Services.Authentication;
|
||||
using Infrastructure.Services.Email;
|
||||
using Infrastructure.Services.HashingAlgorithms;
|
||||
using Infrastructure.Services.MongoDB;
|
||||
@@ -26,6 +27,7 @@ public static class DependencyInjection
|
||||
services.AddScoped<IPatientRepository, PatientRepository>();
|
||||
services.AddScoped<IDoctorRepository, DoctorRepository>();
|
||||
services.AddScoped<IMedicalHistoryRepository, MedicalHistoryRepository>();
|
||||
services.AddScoped<IAdminRepository, AdminRepository>();
|
||||
|
||||
// MongoDB services
|
||||
services.AddSingleton<IMedicalHistoryMongoDbService>(serviceProvider =>
|
||||
@@ -60,7 +62,6 @@ public static class DependencyInjection
|
||||
|
||||
// Other Services
|
||||
services.AddScoped<IHashingAlgorithms, HashingAlgorithms>();
|
||||
|
||||
services.AddSingleton<IJwtService, JwtService>(serviceProvider =>
|
||||
{
|
||||
var configuration = serviceProvider.GetRequiredService<IConfiguration>();
|
||||
@@ -69,6 +70,8 @@ public static class DependencyInjection
|
||||
|
||||
services.Configure<SmtpSettings>(configuration.GetSection("SmtpSettings"));
|
||||
services.AddScoped<IEmailService, EmailService>();
|
||||
|
||||
services.AddHostedService<AppointmentCleanupService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user