Feature: Join us api call
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
17
src/Web/Endpoints/JoinUs.cs
Normal file
17
src/Web/Endpoints/JoinUs.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user