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/APIControllers/GetPosts.cs
RakVhalate a4b72664fd
All checks were successful
continuous-integration/drone/push Build is passing
Added some folders.
2022-11-25 22:40:17 +10:00

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 ;
}
}
}