feat(notifications): add POST /refresh schedule response

Return shouldNotify and nextNotifications with a 10-minute lookahead
timestamp for the app schedule API.
This commit is contained in:
Jose Olarte III
2026-05-11 15:59:26 +08:00
parent 64ea7d2f98
commit 2b57ec0e1c

View File

@@ -7,6 +7,15 @@ notificationsRouter.get("/", (_req, res) => {
res.json({ ok: true, resource: "notifications" });
});
notificationsRouter.post("/refresh", async (_req, res) => {
const now = Date.now();
res.json({
shouldNotify: true,
nextNotifications: [{ timestamp: now + 600000 }],
});
});
notificationsRouter.post("/register", async (req, res) => {
const { fcmToken, platform, testMode } = req.body as {
fcmToken?: unknown;