#27 get last receipt, get minimalUser, get my user

This commit is contained in:
Dominic Villemure
2024-05-12 16:40:24 -04:00
parent 3f20563850
commit 5161e3a91a
17 changed files with 216 additions and 24 deletions

View File

@@ -1,4 +1,5 @@
using Hutopy.Application.Users.Commands;
using Hutopy.Application.Users.Queries.GetMinimalUser;
using Hutopy.Domain.Interfaces;
using Hutopy.Infrastructure.Identity;
@@ -10,6 +11,7 @@ public class Users : EndpointGroupBase
{
app.MapGroup(this)
.MapPost(CreateUser)
.MapGet(GetMinimalUser)
.MapIdentityApi<ApplicationUser>();
}
@@ -18,4 +20,9 @@ public class Users : EndpointGroupBase
await userService.CreateUserAsync(command.EmailAddress, command.UserName, command.FirstName, command.LastName, command.Password);
return await sender.Send(command);
}
private static async Task<MinimalUserDto> GetMinimalUser(ISender sender, [AsParameters] GetMinimalUserQuery query)
{
return await sender.Send(query);
}
}