Merge - Geminimal & CreatorInfo

This commit is contained in:
PascalMarchesseault
2024-06-09 23:03:33 -04:00
parent 1c277f530d
commit 48dcae22a3
7 changed files with 34 additions and 117 deletions

View File

@@ -1,19 +0,0 @@
using Hutopy.Application.Users.Queries;
using Hutopy.Application.Users.Queries.GetCreatorInfo;
namespace Hutopy.Web.Endpoints;
public class GetCreatorInfo : EndpointGroupBase
{
public override void Map(WebApplication app)
{
app.MapGroup(this)
.MapGet(GetSelectedCreatorInfo);
}
private static async Task<CreatorInfoDto> GetSelectedCreatorInfo(ISender sender, [AsParameters] GetCreatorInfoQuery query)
{
return await sender.Send(query);
}
}

View File

@@ -12,15 +12,17 @@ public class Users : EndpointGroupBase
.MapPost(CreateUser)
.MapGet(GetMinimalUser)
.MapIdentityApi<ApplicationUser>();
}
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command)
{
return await sender.Send(command);
}
private static async Task<MinimalUserDto> GetMinimalUser(ISender sender, [AsParameters] GetMinimalUserQuery query)
{
return await sender.Send(query);
}
}