18 lines
434 B
C#
18 lines
434 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using System.Text.Json;
|
|
|
|
namespace NeDvachAPI.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
public class PostToController : ControllerBase
|
|
{
|
|
[HttpGet(Name = "PostPosts")]
|
|
public void ReceivePost(string postJson)
|
|
{
|
|
Post ReceivedPost = JsonSerializer.Deserialize<Post>(postJson);
|
|
DBchat.SendPost(ReceivedPost);
|
|
}
|
|
}
|
|
}
|