Removed todos and added User endpoint combined with register. Id changed to guid
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Hutopy.Application.FutureCreators.Commands;
|
||||
using Hutopy.Application.Common.Models;
|
||||
using Hutopy.Application.FutureCreators.Commands;
|
||||
using Hutopy.Application.FutureCreators.Queries;
|
||||
|
||||
namespace Hutopy.Web.Endpoints;
|
||||
|
||||
@@ -7,11 +9,17 @@ public class JoinUs : EndpointGroupBase
|
||||
public override void Map(WebApplication app)
|
||||
{
|
||||
app.MapGroup(this)
|
||||
.MapGet(GetFutureCreators)
|
||||
.MapPost(CreateFutureCreator);
|
||||
}
|
||||
|
||||
private static Task<int> CreateFutureCreator(ISender sender, CreateFutureCreatorCommand command)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user