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

19 lines
493 B
C#
Raw Normal View History

2022-10-17 14:29:09 +10:00
using Microsoft.AspNetCore.Mvc;
using System.Text.Json;
namespace NeDvachAPI.Controllers
{
[ApiController]
[Route("[controller]")]
public class PostToController : ControllerBase
{
2022-10-18 01:25:59 +10:00
[HttpPost(Name = "PostPosts")]
2022-10-20 22:24:04 +10:00
public JsonResult ReceivePost([FromBody] Post ReceivedPost)
2022-10-17 14:29:09 +10:00
{
2022-10-20 22:24:04 +10:00
Console.WriteLine("Принят пост");
2022-10-17 14:29:09 +10:00
DBchat.SendPost(ReceivedPost);
2022-10-20 22:24:04 +10:00
return new JsonResult("Posted Successfully!");
2022-10-17 14:29:09 +10:00
}
}
}