using Hutopy.Application.Users.Commands; using Hutopy.Application.Users.Queries.GetMinimalUser; using Hutopy.Infrastructure.Identity; namespace Hutopy.Web.Endpoints; public class Users : EndpointGroupBase { public override void Map(WebApplication app) { app.MapGroup(this) .MapPost(CreateUser) .MapGet(GetMinimalUser) .MapIdentityApi(); } private static async Task CreateUser(ISender sender, CreateUserCommand command) { return await sender.Send(command); } private static async Task GetMinimalUser(ISender sender, [AsParameters] GetMinimalUserQuery query) { return await sender.Send(query); } }