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