new structure
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-18 14:46:31 +10:00
parent 4aab13329f
commit 2c984eaf0b
4 changed files with 27 additions and 24 deletions

View File

@@ -11,16 +11,12 @@ namespace NeDvachAPI.Controllers
public class ListController : ControllerBase
{
[HttpGet(Name = "GetPosts")]
public string Get([FromUri] string board = null)
public string Get([FromUri] string board, int thread)
{
//Post[] posts = DBchat.DbList();
List<Post> posts = DBchat.DbList(board);
List<Post> posts = DBchat.DbList(board, thread);
string postsJson = JsonSerializer.Serialize(posts);
Console.WriteLine("Запрошен список постов из борды " + board);
Console.WriteLine("Запрошен список постов из борды " + board + " и треда# " + thread );
return postsJson ;
}
}
}