main
|
Last change
on this file since 47a0d29 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 | */
|
|---|
| 5 | import express from 'express';
|
|---|
| 6 | import { requireAuth } from '../middleware/auth.js';
|
|---|
| 7 | import { renderPage } from '../middleware/render.js';
|
|---|
| 8 | import { list, markAllRead } from '../services/NotificationService.js';
|
|---|
| 9 |
|
|---|
| 10 | const router = express.Router();
|
|---|
| 11 |
|
|---|
| 12 | router.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 |
|
|---|
| 23 | export default router;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.