varianta proiect care merge

This commit is contained in:
andrei-mihnea-cerbu
2024-04-08 14:23:44 +03:00
parent 370bbdedcd
commit 897193c865
333 changed files with 1090 additions and 98769 deletions
@@ -5,19 +5,19 @@ namespace HealthcareManagerUI.Services.Authentication;
// In AuthenticationService.cs
public class AuthenticationService : IAuthenticationService
{
private readonly IHttpService _httpService;
private readonly IRequestHttpService _requestHttpService;
private readonly string _apiUrl = "http://localhost:5151/api";
public AuthenticationService(IHttpService httpService)
public AuthenticationService(IRequestHttpService requestHttpService)
{
_httpService = httpService;
_requestHttpService = requestHttpService;
}
public async Task<BaseResponse> LoginDoctor(UserLoginModel userLoginModel)
{
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/login", userLoginModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/login", userLoginModel);
return response;
}
catch (Exception ex)
@@ -35,7 +35,7 @@ public class AuthenticationService : IAuthenticationService
{
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/login", userLoginModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/login", userLoginModel);
return response;
}
catch (Exception ex)
@@ -52,7 +52,7 @@ public class AuthenticationService : IAuthenticationService
{
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/register", userRegistrationModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/register", userRegistrationModel);
return response;
}
catch (Exception ex)
@@ -77,7 +77,7 @@ public class AuthenticationService : IAuthenticationService
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/register", userRegisterModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/register", userRegisterModel);
return response;
}
catch (Exception ex)
@@ -95,7 +95,7 @@ public class AuthenticationService : IAuthenticationService
{
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/reset_password", userResetPasswordModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/reset_password", userResetPasswordModel);
return response;
}
catch (Exception ex)
@@ -113,7 +113,7 @@ public class AuthenticationService : IAuthenticationService
{
try
{
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/reset_password", userResetPasswordModel);
var response = await _requestHttpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/reset_password", userResetPasswordModel);
return response;
}
catch (Exception ex)