feat: add "Save" action for notifications

Signed-off-by: Marek Libra <marek.libra@gmail.com>
This commit is contained in:
Marek Libra
2024-03-06 10:15:16 +01:00
parent 7ee70ec47e
commit 75f2d84069
8 changed files with 114 additions and 26 deletions
@@ -224,6 +224,12 @@ export async function createRouter(
opts.read = false;
// or keep undefined
}
if (req.query.saved === 'true') {
opts.saved = true;
} else if (req.query.saved === 'false') {
opts.saved = false;
// or keep undefined
}
if (req.query.created_after) {
const sinceEpoch = Date.parse(String(req.query.created_after));
if (isNaN(sinceEpoch)) {