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!");
        }
    }
}
