Merge remote-tracking branch 'origin/master' into feature/oauth
# Conflicts: # src/Application/Common/Interfaces/IIdentityService.cs # src/Application/Users/Commands/CreateUser.cs # src/Infrastructure/Identity/IdentityService.cs # src/Infrastructure/Services/UserService.cs # src/Web/Program.cs
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using Azure.Identity;
|
||||
using Hutopy.Application.Common.Interfaces;
|
||||
using Hutopy.Domain.Interfaces;
|
||||
using Hutopy.Infrastructure.Data;
|
||||
using Hutopy.Infrastructure.Services;
|
||||
using Hutopy.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NSwag;
|
||||
@@ -17,8 +15,6 @@ public static class DependencyInjection
|
||||
services.AddDatabaseDeveloperPageExceptionFilter();
|
||||
|
||||
services.AddScoped<IUser, CurrentUser>();
|
||||
services.AddScoped<IUserService, UserService>();
|
||||
|
||||
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Hutopy.Application.Users.Queries;
|
||||
using Hutopy.Application.Users.Queries.GetCurrentUser;
|
||||
|
||||
namespace Hutopy.Web.Endpoints;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Hutopy.Application.Users.Commands;
|
||||
using Hutopy.Application.Users.Queries.GetMinimalUser;
|
||||
using Hutopy.Domain.Interfaces;
|
||||
using Hutopy.Infrastructure.Identity;
|
||||
|
||||
namespace Hutopy.Web.Endpoints;
|
||||
@@ -15,9 +14,8 @@ public class Users : EndpointGroupBase
|
||||
.MapIdentityApi<ApplicationUser>();
|
||||
}
|
||||
|
||||
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command, IUserService userService)
|
||||
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command)
|
||||
{
|
||||
await userService.CreateUserAsync(command.EmailAddress, command.UserName, command.FirstName, command.LastName, command.Password);
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Hutopy.Application;
|
||||
using Hutopy.Domain.Interfaces;
|
||||
using Hutopy.Infrastructure;
|
||||
using Hutopy.Infrastructure.Data;
|
||||
using Hutopy.Infrastructure.Services;
|
||||
using Hutopy.Web;
|
||||
using Azure.Identity;
|
||||
using Hutopy.Infrastructure.Identity;
|
||||
|
||||
@@ -736,6 +736,16 @@
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/UserTransactionDto"
|
||||
}
|
||||
},
|
||||
"userRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"totalBalance": {
|
||||
"type": "number",
|
||||
"format": "decimal"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -752,6 +762,13 @@
|
||||
},
|
||||
"tipMessage": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"isConfirmed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user