mirror of
https://github.com/wg-easy/wg-easy.git
synced 2025-10-05 15:47:18 +08:00
Fix traffic charts. Add chart vars
Add UI_TRAFFIC_STATS, UI_CHART_TYPE
This commit is contained in:
@@ -19,6 +19,7 @@ const {
|
||||
PASSWORD,
|
||||
LANG,
|
||||
UI_TRAFFIC_STATS,
|
||||
UI_CHART_TYPE,
|
||||
} = require('../config');
|
||||
|
||||
module.exports = class Server {
|
||||
@@ -45,6 +46,9 @@ module.exports = class Server {
|
||||
.get('/api/ui-traffic-stats', (Util.promisify(async () => {
|
||||
return UI_TRAFFIC_STATS === 'true';
|
||||
})))
|
||||
.get('/api/ui-chart-type', (Util.promisify(async () => {
|
||||
return UI_CHART_TYPE || 0;
|
||||
})))
|
||||
|
||||
// Authentication
|
||||
.get('/api/session', Util.promisify(async (req) => {
|
||||
|
Reference in New Issue
Block a user