22 lines
639 B
C#
22 lines
639 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using NeDvachAPI.BufferControllers;
|
|
using System.Text.Json;
|
|
using System.Web.Http;
|
|
using HttpGetAttribute = Microsoft.AspNetCore.Mvc.HttpGetAttribute;
|
|
using RouteAttribute = Microsoft.AspNetCore.Mvc.RouteAttribute;
|
|
|
|
namespace NeDvachAPI.Controllers
|
|
{
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
public class ListController : ControllerBase
|
|
{
|
|
[HttpGet(Name = "GetPosts")]
|
|
public string Get([FromUri] string board, int thread)
|
|
{
|
|
string postsJson = JsonSerializer.Serialize(APIThreadBuffer.GetThread(thread));
|
|
return postsJson ;
|
|
}
|
|
}
|
|
}
|