#48 added basic role features and some cleanUp

This commit is contained in:
Dominic Villemure
2024-06-02 15:59:17 -04:00
parent d5048d3a06
commit c31b3a2e71
14 changed files with 136 additions and 23 deletions

View File

@@ -1,5 +1,4 @@
using Hutopy.Application.Common.Interfaces;
using Hutopy.Application.Users.Commands;
using Hutopy.Application.Users.Commands;
using Hutopy.Application.Users.Queries.GetMinimalUser;
using Hutopy.Infrastructure.Identity;
@@ -15,9 +14,8 @@ public class Users : EndpointGroupBase
.MapIdentityApi<ApplicationUser>();
}
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command, IIdentityService identityService)
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command)
{
await identityService.CreateUserAsync(command.EmailAddress, command.UserName, command.FirstName, command.LastName, command.Password);
return await sender.Send(command);
}

View File

@@ -711,6 +711,12 @@
"$ref": "#/components/schemas/UserTransactionDto"
}
},
"userRoles": {
"type": "array",
"items": {
"type": "string"
}
},
"totalBalance": {
"type": "number",
"format": "decimal"