mirror of
https://github.com/wg-easy/wg-easy.git
synced 2025-10-05 15:47:18 +08:00
fixup: UI_TRAFFIC_STATS
This commit is contained in:
@@ -64,9 +64,10 @@ module.exports = class Server {
|
||||
|
||||
return `"${LANG}"`;
|
||||
}))
|
||||
.get('/api/ui-traffic-stats', (Util.promisify(async () => {
|
||||
return UI_TRAFFIC_STATS === 'true';
|
||||
}))
|
||||
.get('/api/ui-traffic-stats', defineEventHandler((event) => {
|
||||
setHeader(event, 'Content-Type', 'application/json');
|
||||
return `"${UI_TRAFFIC_STATS}"`;
|
||||
})
|
||||
|
||||
// Authentication
|
||||
.get('/api/session', defineEventHandler((event) => {
|
||||
|
Reference in New Issue
Block a user