using Hutopy.Application.Users.Queries.GetCurrentUser; using Hutopy.Web.Infrastructure; namespace Hutopy.Web.Endpoints; public class GetMyUser : EndpointGroupBase { public override void Map(WebApplication app) { app.MapGroup(this) .RequireAuthorization() .MapGet(GetCurrentUser) .MapGet(GetCurrentUserProfilePicture, "profile-picture"); } private static async Task GetCurrentUser(ISender sender, [AsParameters] GetCurrentUserQuery query) { return await sender.Send(query); } private static async Task GetCurrentUserProfilePicture(ISender sender, [AsParameters] GetCurrentUserProfilePictureQuery query) { return await sender.Send(query); } }