This commit is contained in:
@@ -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 ;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user