Backend Pacients, Doctors and MedicalHistory endpoints
- added for Pacients: POST: /register POST: /login POST: /reset_password PUT: /profile DELETE: /profile - added for Doctors: POST: /register POST: /login POST: /reset_password PUT: /profile DELETE: /profile - added for MedicalHistories: POST: /:id (only by pacient) - done GET: /:id (only by pacient) - done PUT: /:id (only by doctor) - done PUT /grand_access - TODO
This commit is contained in:
@@ -7,27 +7,26 @@ using Infrastructure.Services.MongoDB;
|
||||
using Application.Services.Database;
|
||||
using Infrastructure.Services.PostgreSQL;
|
||||
|
||||
namespace Infrastructure
|
||||
namespace Infrastructure;
|
||||
|
||||
public static class DependencyInjection
|
||||
{
|
||||
public static class DependencyInjection
|
||||
public static IServiceCollection AddInfrastructureServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
public static IServiceCollection AddInfrastructureServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddDbContext<HealthcareManagerDatabase>(options =>
|
||||
options.UseNpgsql(configuration.GetConnectionString("HealthcareManagerDatabase")));
|
||||
services.AddDbContext<HealthcareManagerDatabase>(options =>
|
||||
options.UseNpgsql(configuration.GetConnectionString("HealthcareManagerDatabase")));
|
||||
|
||||
|
||||
services.AddScoped<IPacientRepository, PacientRepository>();
|
||||
services.AddScoped<IDoctorRepository, DoctorRepository>();
|
||||
services.AddScoped<IMedicalHistoryRepository, MedicalHistoryRepository>();
|
||||
services.AddScoped<IPacientRepository, PacientRepository>();
|
||||
services.AddScoped<IDoctorRepository, DoctorRepository>();
|
||||
services.AddScoped<IMedicalHistoryRepository, MedicalHistoryRepository>();
|
||||
|
||||
var mongoDbConnection = configuration.GetConnectionString("MongoDBDatabase");
|
||||
var mongoDbConnection = configuration.GetConnectionString("MongoDBDatabase");
|
||||
|
||||
services.AddSingleton(serviceProvider => new MongoDbService(mongoDbConnection));
|
||||
services.AddSingleton(serviceProvider => new MongoDbService(mongoDbConnection));
|
||||
|
||||
// services.AddScoped<IEmailService, EmailService>();
|
||||
// services.AddScoped<IEmailService, EmailService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user