Profil: Logout after password change

This commit is contained in:
Andre Beging
2022-05-30 11:17:47 +02:00
parent 607fab1d04
commit e9f0bcc993
3 changed files with 19 additions and 4 deletions

View File

@@ -92,8 +92,10 @@ namespace FoodsharingSiegen.Server.Pages
private async Task OnPasswordSet(User arg)
{
var setPasswordR = await UserService?.SetPassword(arg)!;
if(setPasswordR.Success)
await Notification?.Success("Dein neues Passwort wurde gespeichert")!;
if (setPasswordR.Success)
NavigationManager?.NavigateTo("/logout");
else
await Notification?.Success(setPasswordR.ErrorMessage)!;
}
#endregion