Merge pull request #23645 from mareklibra/FLPATH-1090.bulkActions

feat: add bulk actions to the Notifications page
This commit is contained in:
Marek Libra
2024-04-08 12:13:41 +02:00
committed by GitHub
6 changed files with 294 additions and 122 deletions
@@ -229,6 +229,13 @@ export async function createRouter(
});
});
router.get('/status', async (req, res) => {
const user = await getUser(req);
const status = await store.getStatus({ user });
res.send(status);
});
// Make sure this is the last "GET" handler
router.get('/:id', async (req, res) => {
const user = await getUser(req);
const opts: NotificationGetOptions = {
@@ -244,12 +251,6 @@ export async function createRouter(
res.send(notifications[0]);
});
router.get('/status', async (req, res) => {
const user = await getUser(req);
const status = await store.getStatus({ user });
res.send(status);
});
router.post('/update', async (req, res) => {
const user = await getUser(req);
const { ids, read, saved } = req.body;