From ed30f3dcc4633e756febac0a5f65d185df624ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Michel?= Date: Mon, 1 Nov 2021 15:35:26 +0100 Subject: [PATCH] fix bad redirection (#608) * fix bad redirection fix cleanning of local storage on startup * update all nuget package * avoid magic string --- src/ApplicationCore/ApplicationCore.csproj | 2 +- src/BlazorAdmin/Program.cs | 10 ++++++---- src/Infrastructure/Infrastructure.csproj | 2 +- src/PublicApi/PublicApi.csproj | 2 +- src/Web/Controllers/ManageController.cs | 2 +- src/Web/Web.csproj | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ApplicationCore/ApplicationCore.csproj b/src/ApplicationCore/ApplicationCore.csproj index 81cd750..15462bf 100644 --- a/src/ApplicationCore/ApplicationCore.csproj +++ b/src/ApplicationCore/ApplicationCore.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/BlazorAdmin/Program.cs b/src/BlazorAdmin/Program.cs index e33aa75..042a275 100644 --- a/src/BlazorAdmin/Program.cs +++ b/src/BlazorAdmin/Program.cs @@ -1,6 +1,7 @@ using BlazorAdmin.Services; using Blazored.LocalStorage; using BlazorShared; +using BlazorShared.Models; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.Configuration; @@ -27,13 +28,13 @@ namespace BlazorAdmin builder.Services.AddScoped(); builder.Services.AddScoped(); - + builder.Services.AddBlazoredLocalStorage(); - + builder.Services.AddAuthorizationCore(); builder.Services.AddScoped(); builder.Services.AddScoped(sp => (CustomAuthStateProvider)sp.GetRequiredService()); - + builder.Services.AddBlazorServices(); builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging")); @@ -48,7 +49,8 @@ namespace BlazorAdmin var sp = services.BuildServiceProvider(); var localStorageService = sp.GetRequiredService(); - await localStorageService.RemoveItemAsync("brands"); + await localStorageService.RemoveItemAsync(typeof(CatalogBrand).Name); + await localStorageService.RemoveItemAsync(typeof(CatalogType).Name); } } } diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj index 1fe3dae..0b916f9 100644 --- a/src/Infrastructure/Infrastructure.csproj +++ b/src/Infrastructure/Infrastructure.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/PublicApi/PublicApi.csproj b/src/PublicApi/PublicApi.csproj index 52b3257..7d99e41 100644 --- a/src/PublicApi/PublicApi.csproj +++ b/src/PublicApi/PublicApi.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Web/Controllers/ManageController.cs b/src/Web/Controllers/ManageController.cs index 97036b8..c03f507 100644 --- a/src/Web/Controllers/ManageController.cs +++ b/src/Web/Controllers/ManageController.cs @@ -125,7 +125,7 @@ namespace Microsoft.eShopWeb.Web.Controllers await _emailSender.SendEmailConfirmationAsync(email, callbackUrl); StatusMessage = "Verification email sent. Please check your email."; - return RedirectToAction(nameof(Index)); + return RedirectToAction(nameof(MyAccount)); } [HttpGet] diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index 7416a4b..d016923 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -42,7 +42,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - +