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/Controllers/ShowThreads.cs

21 lines
588 B
C#
Raw Normal View History

2022-11-24 12:56:07 +10:00
using Microsoft.AspNetCore.Mvc;
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 ThreadsController : ControllerBase
{
[HttpGet(Name = "GetThreads")]
public string Get([FromUri] string board)
{
2022-11-25 12:37:26 +10:00
string postsJson = JsonSerializer.Serialize(APIThreadBuffer.GetOPPosts());
return postsJson;
2022-11-24 12:56:07 +10:00
}
}
}