fix: from-game endpoint only returns notifications after today
This commit is contained in:
@@ -61,6 +61,7 @@ app.get("/api/announcements/from-game", async (req, res) => {
|
|||||||
.selectFrom("announcements")
|
.selectFrom("announcements")
|
||||||
.select(["id", "title", "text", "publication_date", "image"])
|
.select(["id", "title", "text", "publication_date", "image"])
|
||||||
.orderBy("announcements.publication_date", "desc")
|
.orderBy("announcements.publication_date", "desc")
|
||||||
|
.where("publication_date", "<=", new Date().toISOString())
|
||||||
.limit(3)
|
.limit(3)
|
||||||
.execute();
|
.execute();
|
||||||
res.json(announcements);
|
res.json(announcements);
|
||||||
|
|||||||
Reference in New Issue
Block a user