fix: from-game endpoint only returns notifications after today

This commit is contained in:
redglow
2026-06-21 16:24:07 +02:00
parent 82eda9e353
commit c7ce79f915
+1
View File
@@ -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);