27 lines
766 B
C#
27 lines
766 B
C#
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<Guid> CreateFutureCreator(ISender sender, CreateFutureCreatorCommand command)
|
|
{
|
|
return sender.Send(command);
|
|
}
|
|
|
|
private static Task<PaginatedList<FutureCreatorListDto>> GetFutureCreators(ISender sender, [AsParameters] GetFutureCreatorListQuery query)
|
|
{
|
|
return sender.Send(query);
|
|
}
|
|
}
|