|
|
@ -10,17 +10,10 @@ using HeartTrack.Services.ActivityDataService;
|
|
|
|
using HeartTrack.Services.ReportDataService;
|
|
|
|
using HeartTrack.Services.ReportDataService;
|
|
|
|
using HeartTrack.Services.UserDataService;
|
|
|
|
using HeartTrack.Services.UserDataService;
|
|
|
|
using HeartTrack.Services.TicketDataService;
|
|
|
|
using HeartTrack.Services.TicketDataService;
|
|
|
|
using Blazorise;
|
|
|
|
|
|
|
|
using Blazorise.Bootstrap;
|
|
|
|
|
|
|
|
using Blazorise.Icons.FontAwesome;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Localization;
|
|
|
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
|
|
using Blazored.LocalStorage;
|
|
|
|
|
|
|
|
using HeartTrack.Services;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
|
|
using MudBlazor.Services;
|
|
|
|
using MudBlazor.Services;
|
|
|
|
using HeartTrack.Services.TicketDataServiceFactice;
|
|
|
|
using HeartTrack.Services.TicketDataServiceFactice;
|
|
|
|
|
|
|
|
using HeartTrack.Services.AuthentificationService;
|
|
|
|
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
|
@ -30,6 +23,13 @@ builder.Services.AddMudServices();
|
|
|
|
// Add services to the container.
|
|
|
|
// Add services to the container.
|
|
|
|
builder.Services.AddRazorPages();
|
|
|
|
builder.Services.AddRazorPages();
|
|
|
|
builder.Services.AddServerSideBlazor();
|
|
|
|
builder.Services.AddServerSideBlazor();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddOptions();
|
|
|
|
|
|
|
|
builder.Services.AddAuthorizationCore();
|
|
|
|
|
|
|
|
builder.Services.AddScoped<CustomStateProvider>();
|
|
|
|
|
|
|
|
builder.Services.AddScoped<AuthenticationStateProvider>(s => s.GetRequiredService<CustomStateProvider>());
|
|
|
|
|
|
|
|
builder.Services.AddScoped<IAuthService, AuthService>();
|
|
|
|
|
|
|
|
|
|
|
|
builder.Services.AddHttpClient();
|
|
|
|
builder.Services.AddHttpClient();
|
|
|
|
|
|
|
|
|
|
|
|
// Add Services
|
|
|
|
// Add Services
|
|
|
@ -115,6 +115,7 @@ if (options?.Value != null)
|
|
|
|
app.UseRequestLocalization(options.Value);
|
|
|
|
app.UseRequestLocalization(options.Value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add the controller to the endpoint
|
|
|
|
// Add the controller to the endpoint
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
|
|
app.UseEndpoints(endpoints =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|