Merge - Geminimal & CreatorInfo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,38 +6,6 @@
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/GetCreatorInfo": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"GetCreatorInfo"
|
||||
],
|
||||
"operationId": "GetSelectedCreatorInfo",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "UserName",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"x-position": 1
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreatorInfoDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/GetMyUser": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -283,12 +251,20 @@
|
||||
{
|
||||
"name": "UserId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"x-position": 1
|
||||
},
|
||||
{
|
||||
"name": "UserName",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"x-position": 2
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -720,21 +696,6 @@
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"CreatorInfoDto": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"firstName": {
|
||||
"type": "string"
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string"
|
||||
},
|
||||
"userName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UserDto": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
Reference in New Issue
Block a user