Removed todos and added User endpoint combined with register. Id changed to guid

This commit is contained in:
Dominic Villemure
2024-04-03 23:57:01 -04:00
parent df8b42bdf1
commit 1f795c53bb
67 changed files with 1750 additions and 1895 deletions

View File

@@ -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);
}
}