CleanUp and added migration
This commit is contained in:
18
src/Web/Endpoints/FuturCreators.cs
Normal file
18
src/Web/Endpoints/FuturCreators.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Hutopy.Application.FuturCreators.Commands.CreateFuturCreator;
|
||||
|
||||
namespace Hutopy.Web.Endpoints;
|
||||
|
||||
public class FuturCreators : EndpointGroupBase
|
||||
{
|
||||
public override void Map(WebApplication app)
|
||||
{
|
||||
app.MapGroup(this)
|
||||
.RequireAuthorization()
|
||||
.MapPost(CreateFuturCreator);
|
||||
}
|
||||
|
||||
public Task<int> CreateFuturCreator(ISender sender, CreateFuturCreatorCommand command)
|
||||
{
|
||||
return sender.Send(command);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,44 @@
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/FuturCreators": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"FuturCreators"
|
||||
],
|
||||
"operationId": "CreateFuturCreator",
|
||||
"requestBody": {
|
||||
"x-name": "command",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CreateFuturCreatorCommand"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true,
|
||||
"x-position": 1
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"JWT": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/TodoItems": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -757,6 +795,30 @@
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"CreateFuturCreatorCommand": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"firstName": {
|
||||
"type": "string"
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string"
|
||||
},
|
||||
"emailAddress": {
|
||||
"type": "string"
|
||||
},
|
||||
"phoneNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"socialNetworkAccount": {
|
||||
"type": "string"
|
||||
},
|
||||
"reasonToJoin": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PaginatedListOfTodoItemBriefDto": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
||||
Reference in New Issue
Block a user