This commit is contained in:
Simple_Not 2022-10-29 13:36:25 +10:00
parent 0efca3b0b5
commit 75b9958b97

View File

@ -45,7 +45,7 @@ namespace NeDvachAPI
using ( var command = new NpgsqlCommand(@" using ( var command = new NpgsqlCommand(@"
SELECT * FROM SELECT * FROM
( (
SELECT post_id, post SELECT post_id, post, post_timestamp
FROM dvach FROM dvach
ORDER BY post_id DESC ORDER BY post_id DESC
) subquery ) subquery
@ -64,9 +64,10 @@ namespace NeDvachAPI
//); //);
Post receivedPost = new() Post receivedPost = new()
{ {
Date = DateTime.Now, // Date = DateTime.Now,
Id = reader.GetInt32(0), Id = reader.GetInt32(0),
Text = reader.GetString(1) Text = reader.GetString(1),
Date = reader.GetString(2)
}; };
posts.Add(receivedPost); posts.Add(receivedPost);
//posts[postCount] = receivedPost; //posts[postCount] = receivedPost;