This repository has been archived on 2023-06-30. You can view files and clone it, but cannot push or open issues or pull requests.
2chBackAPI/Controllers/PostPost.cs
2022-10-20 22:24:04 +10:00

19 lines
493 B
C#

using Microsoft.AspNetCore.Mvc;
using System.Text.Json;
namespace NeDvachAPI.Controllers
{
[ApiController]
[Route("[controller]")]
public class PostToController : ControllerBase
{
[HttpPost(Name = "PostPosts")]
public JsonResult ReceivePost([FromBody] Post ReceivedPost)
{
Console.WriteLine("Принят пост");
DBchat.SendPost(ReceivedPost);
return new JsonResult("Posted Successfully!");
}
}
}