CleanUp and added migration

This commit is contained in:
Dominic Villemure
2024-03-17 16:59:20 -04:00
parent 0f7cdb3abd
commit d565d0c98b
9 changed files with 96 additions and 13 deletions

View 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);
}
}

View File

@@ -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,