source: Klonkt/src/routes/notifications.js@ 79d1281

main
Last change on this file since 79d1281 was 834bcc3, checked in by Robin Genis <roboburr@…>, 3 months ago

i18n: translate Dutch code comments to English across src/

Comments in routes/services/views/config/middleware/assets translated to
English for the public repo. A few dev-facing throw/console message strings
were Englished too. No user-facing UI strings or i18n dictionary values changed
(src/services/i18n.js untouched). Logic unchanged.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 682 bytes
Line 
1/**
2 * GET /notifications — notifications page for the logged-in user.
3 * Opening it marks everything as read (the counter in the header disappears).
4 */
5import express from 'express';
6import { requireAuth } from '../middleware/auth.js';
7import { renderPage } from '../middleware/render.js';
8import { list, markAllRead } from '../services/NotificationService.js';
9
10const router = express.Router();
11
12router.get('/', requireAuth, (req, res) => {
13 const uid = req.session.user.id;
14 const items = list(uid, 50);
15 markAllRead(uid);
16 renderPage(req, res, 'pages/notifications', {
17 pageTitle: 'Meldingen',
18 bodyClass: 'on-special',
19 items,
20 });
21});
22
23export default router;
Note: See TracBrowser for help on using the repository browser.