Recreated plugin with new project template. Started implementing server system daemon
This commit is contained in:
21
MoonlightServers.Api/Http/Controllers/FormController.cs
Normal file
21
MoonlightServers.Api/Http/Controllers/FormController.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MoonlightServers.Shared.Http.Requests;
|
||||
using MoonlightServers.Shared.Http.Responses;
|
||||
|
||||
namespace MoonlightServers.Api.Http.Controllers;
|
||||
|
||||
[Authorize]
|
||||
[ApiController]
|
||||
[Route("api/form")]
|
||||
public class FormController : Controller
|
||||
{
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<FormResultDto>> PostAsync([FromBody] FormSubmitDto dto)
|
||||
{
|
||||
return new FormResultDto()
|
||||
{
|
||||
Result = dto.TextField.Replace(" ", string.Empty)
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user