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

22 lines
639 B
C#
Raw Normal View History

2022-10-17 14:29:09 +10:00
using Microsoft.AspNetCore.Mvc;
2022-11-25 22:40:17 +10:00
using NeDvachAPI.BufferControllers;
2022-10-17 14:29:09 +10:00
using System.Text.Json;
2022-11-12 03:10:57 +10:00
using System.Web.Http;
using HttpGetAttribute = Microsoft.AspNetCore.Mvc.HttpGetAttribute;
using RouteAttribute = Microsoft.AspNetCore.Mvc.RouteAttribute;
2022-10-17 14:29:09 +10:00
namespace NeDvachAPI.Controllers
{
[ApiController]
[Route("[controller]")]
2022-10-18 12:48:46 +10:00
public class ListController : ControllerBase
2022-10-17 14:29:09 +10:00
{
[HttpGet(Name = "GetPosts")]
2022-11-18 14:46:31 +10:00
public string Get([FromUri] string board, int thread)
2022-11-22 18:03:38 +10:00
{
2022-11-25 12:37:26 +10:00
string postsJson = JsonSerializer.Serialize(APIThreadBuffer.GetThread(thread));
2022-10-17 14:29:09 +10:00
return postsJson ;
}
}
}