update-current-user WIP

This commit is contained in:
Dominic Villemure
2024-06-29 22:45:17 -04:00
committed by Jonathan Bourdon
parent 72e243cf84
commit 5282fcfd49
13 changed files with 855 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
using Hutopy.Application.Users.Commands;
namespace Hutopy.Web.Endpoints;
public class UpdateMyUser : EndpointGroupBase
{
public override void Map(WebApplication app)
{
app.MapGroup(this)
.RequireAuthorization()
.MapPatch("/profile", UpdateCurrentUser);
}
private static async Task<string> UpdateCurrentUser(ISender sender, UpdateCurrentUserCommand command)
{
return await sender.Send(command);
}
}