Feature: Join us api call

This commit is contained in:
Kamigen
2024-03-17 21:03:08 -04:00
parent fca3d26aa7
commit b7ec5a69a9
11 changed files with 46 additions and 53 deletions

View File

@@ -1,18 +0,0 @@
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

@@ -0,0 +1,17 @@
using Hutopy.Application.FutureCreators.Commands;
namespace Hutopy.Web.Endpoints;
public class JoinUs : EndpointGroupBase
{
public override void Map(WebApplication app)
{
app.MapGroup(this)
.MapPost(CreateFutureCreator);
}
public Task<int> CreateFutureCreator(ISender sender, CreateFutureCreatorCommand command)
{
return sender.Send(command);
}
}

View File

@@ -6,18 +6,18 @@
"version": "1.0.0"
},
"paths": {
"/api/FuturCreators": {
"/api/JoinUs": {
"post": {
"tags": [
"FuturCreators"
"JoinUs"
],
"operationId": "CreateFuturCreator",
"operationId": "CreateFutureCreator",
"requestBody": {
"x-name": "command",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateFuturCreatorCommand"
"$ref": "#/components/schemas/CreateFutureCreatorCommand"
}
}
},
@@ -36,12 +36,7 @@
}
}
}
},
"security": [
{
"JWT": []
}
]
}
}
},
"/api/TodoItems": {
@@ -795,7 +790,7 @@
},
"components": {
"schemas": {
"CreateFuturCreatorCommand": {
"CreateFutureCreatorCommand": {
"type": "object",
"additionalProperties": false,
"properties": {