Code Cleanup und Passwort ändern im Profil
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Blazorise;
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using FoodsharingSiegen.Server.Data.Service;
|
||||
using FoodsharingSiegen.Server.Dialogs;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Pages
|
||||
@@ -11,16 +12,25 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
public partial class Profile
|
||||
{
|
||||
#region Dependencies (Injected)
|
||||
|
||||
|
||||
#region Dependencies (Injected)
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user service (ab)
|
||||
/// </summary>
|
||||
[Inject] public UserService? UserService { get; set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the password modal (ab)
|
||||
/// </summary>
|
||||
private SetPasswordModal? PasswordModal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user (ab)
|
||||
/// </summary>
|
||||
@@ -73,6 +83,21 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method OnPasswordSet
|
||||
|
||||
/// <summary>
|
||||
/// Ons the password set using the specified arg (a. beging, 23.05.2022)
|
||||
/// </summary>
|
||||
/// <param name="arg">The arg</param>
|
||||
private async Task OnPasswordSet(User arg)
|
||||
{
|
||||
var setPasswordR = await UserService?.SetPassword(arg)!;
|
||||
if(setPasswordR.Success)
|
||||
await Notification?.Success("Dein neues Passwort wurde gespeichert")!;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method RemoveAccount
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user