varianta proiect care merge
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
using HealthcareManagerUI.Components;
|
||||
using HealthcareManagerUI.Services.Authentication;
|
||||
using Blazored.LocalStorage;
|
||||
using HealthcareManagerUI;
|
||||
using HealthcareManagerUI.Services.Http;
|
||||
using HealthcareManagerUI.Services.TokenService;
|
||||
using AuthenticationService = Microsoft.AspNetCore.Authentication.AuthenticationService;
|
||||
using IAuthenticationService = Microsoft.AspNetCore.Authentication.IAuthenticationService;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -8,12 +11,14 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
|
||||
builder.Services.AddScoped<IHttpService>(provider =>
|
||||
builder.Services.AddScoped<IRequestHttpService>(provider =>
|
||||
{
|
||||
var configuration = provider.GetRequiredService<IConfiguration>();
|
||||
return new HttpService(configuration);
|
||||
return new RequestHttpService(configuration);
|
||||
});
|
||||
builder.Services.AddScoped<IAuthenticationService, AuthenticationService>();
|
||||
builder.Services.AddBlazoredLocalStorage();
|
||||
builder.Services.AddScoped<ITokenService, TokenService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user