fixup: UI_TRAFFIC_STATS

This commit is contained in:
Philip H. 2024-03-14 08:14:52 +00:00 committed by GitHub
parent b7c2c81cc7
commit 3f2495a0ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -64,9 +64,10 @@ module.exports = class Server {
return `"${LANG}"`; return `"${LANG}"`;
})) }))
.get('/api/ui-traffic-stats', (Util.promisify(async () => { .get('/api/ui-traffic-stats', defineEventHandler((event) => {
return UI_TRAFFIC_STATS === 'true'; setHeader(event, 'Content-Type', 'application/json');
})) return `"${UI_TRAFFIC_STATS}"`;
})
// Authentication // Authentication
.get('/api/session', defineEventHandler((event) => { .get('/api/session', defineEventHandler((event) => {