Add password reset functionality for admin users: implement ResetPassword endpoint, update AdminUserEndpoints to include password reset logic, and enhance user interface for password management. Update translations for new features and ensure proper error handling in the reset process.
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
using LiteCqrs;
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
using TeleWave.Application.Common.Models;
|
||||
|
||||
namespace TeleWave.Application.Admin.Users.ResetPassword;
|
||||
|
||||
public sealed class ResetUserPasswordCommandHandler(IIdentityService identityService)
|
||||
: ICommandHandler<ResetUserPasswordCommand, Result>
|
||||
{
|
||||
public Task<Result> Handle(
|
||||
ResetUserPasswordCommand command,
|
||||
CancellationToken cancellationToken
|
||||
) => identityService.ResetPasswordAsync(command.UserId, command.NewPassword, cancellationToken);
|
||||
}
|
||||
Reference in New Issue
Block a user