Changeset 37edecd in Klonkt for src/routes
- Timestamp:
- 06/19/2026 03:46:42 AM (3 months ago)
- Branches:
- main
- Children:
- 1794fac
- Parents:
- 91094a4
- Location:
- src/routes
- Files:
-
- 1 added
- 1 edited
-
admin-stats.js (modified) (2 diffs)
-
linkbio.js (added)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-stats.js
r91094a4 r37edecd 10 10 11 11 import express from 'express'; 12 import db from '../config/database.js'; 12 13 import { renderPage } from '../middleware/render.js'; 13 14 import { requireGod } from '../middleware/auth.js'; … … 21 22 return res.status(403).send('Statistieken is een premium-functie — koppel Patreon in Beheer → Instellingen.'); 22 23 } 24 // Link-in-bio klikken (premium #6) voor de huidige site. 25 let linkClicks = []; 26 if (res.locals.site) { 27 try { 28 linkClicks = db.prepare( 29 'SELECT url, clicks FROM link_clicks WHERE site_id = ? AND clicks > 0 ORDER BY clicks DESC LIMIT 50' 30 ).all(res.locals.site.id); 31 } catch { linkClicks = []; } 32 } 23 33 renderPage(req, res, 'pages/admin-stats', { 24 34 pageTitle: 'Statistieken', 25 35 bodyClass: 'on-admin', 26 36 stats: getStats(14), 37 linkClicks, 27 38 }); 28 39 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)