This commit is contained in:
parent
86d3e2d9b5
commit
5228f74c49
@ -10,10 +10,12 @@ namespace NeDvachAPI.Controllers
|
||||
[HttpGet(Name = "GetPosts")]
|
||||
public string Get()
|
||||
{
|
||||
var remoteIpAddress = request.HttpContext.Connection.RemoteIpAddress;
|
||||
|
||||
//Post[] posts = DBchat.DbList();
|
||||
List<Post> posts = DBchat.DbList();
|
||||
string postsJson = JsonSerializer.Serialize(posts);
|
||||
Console.WriteLine("Запрошен список постов.");
|
||||
Console.WriteLine($"Запрошен список постов для {remoteIpAddress}");
|
||||
return postsJson ;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user