using Hutopy.Application.Common.Models; using Hutopy.Application.FutureCreators.Commands; using Hutopy.Application.FutureCreators.Queries; using Hutopy.Web.Infrastructure; namespace Hutopy.Web.Endpoints; public class JoinUs : EndpointGroupBase { public override void Map(WebApplication app) { app.MapGroup(this) .MapGet(GetFutureCreators) .MapPost(CreateFutureCreator); } private static Task CreateFutureCreator(ISender sender, CreateFutureCreatorCommand command) { return sender.Send(command); } private static Task> GetFutureCreators(ISender sender, [AsParameters] GetFutureCreatorListQuery query) { return sender.Send(query); } }