forked from mirrors/amnezia-wg-easy
Fix traffic charts. Add chart vars
Add UI_TRAFFIC_STATS, UI_CHART_TYPE
This commit is contained in:
parent
ed0e46788a
commit
aedb691b2b
6 changed files with 113 additions and 21 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue