Merge branch 'master' into feat-h3

This commit is contained in:
Philip H 2024-03-19 14:09:42 +01:00 committed by GitHub
commit c107920df2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 267 additions and 112 deletions

View file

@ -31,6 +31,7 @@ const {
PASSWORD,
LANG,
UI_TRAFFIC_STATS,
UI_CHART_TYPE,
} = require('../config');
module.exports = class Server {
@ -57,13 +58,15 @@ module.exports = class Server {
.get('/api/lang', defineEventHandler((event) => {
setHeader(event, 'Content-Type', 'application/json');
return `"${LANG}"`;
}))
.get('/api/ui-traffic-stats', defineEventHandler((event) => {
setHeader(event, 'Content-Type', 'application/json');
return `"${UI_TRAFFIC_STATS}"`;
}))
.get('/api/ui-chart-type', defineEventHandler((event) => {
setHeader(event, 'Content-Type', 'application/json');
return `"${UI_CHART_TYPE}"`;
// Authentication
.get('/api/session', defineEventHandler((event) => {