update-current-user WIP
This commit is contained in:
committed by
Jonathan Bourdon
parent
72e243cf84
commit
5282fcfd49
20
src/Web/Endpoints/UpdateMyUser.cs
Normal file
20
src/Web/Endpoints/UpdateMyUser.cs
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user