mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
18 lines
603 B
C#
18 lines
603 B
C#
using Features.UserManagement.Repository;
|
|
using MediatR;
|
|
|
|
namespace Features.UserManagement.Commands.UpdateUser;
|
|
|
|
/// <summary>
|
|
/// Handles <see cref="UpdateUserCommand" /> by persisting changes to an existing user account.
|
|
/// </summary>
|
|
/// <param name="repository">Repository used to persist the updated user account.</param>
|
|
public class UpdateUserHandler(IUserAccountRepository repository)
|
|
: IRequestHandler<UpdateUserCommand>
|
|
{
|
|
public Task Handle(UpdateUserCommand request, CancellationToken cancellationToken)
|
|
{
|
|
return repository.UpdateAsync(request.UserAccount);
|
|
}
|
|
}
|