forked from mirrors/amnezia-wg-easy
Add UI_DETAILED_STATS variable
Show detailed RX / TX stats when UI_DETAILED_STATS = true Add api method to get UI_DETAILED_STATS value on frontend
This commit is contained in:
parent
a1fdc610ad
commit
fa392cf260
5 changed files with 39 additions and 8 deletions
|
@ -18,6 +18,7 @@ const {
|
|||
RELEASE,
|
||||
PASSWORD,
|
||||
LANG,
|
||||
UI_DETAILED_STATS,
|
||||
} = require('../config');
|
||||
|
||||
module.exports = class Server {
|
||||
|
@ -44,6 +45,9 @@ module.exports = class Server {
|
|||
.get('/api/lang', (Util.promisify(async () => {
|
||||
return LANG;
|
||||
})))
|
||||
.get('/api/ui-detailed-stats', (Util.promisify(async () => {
|
||||
return UI_DETAILED_STATS === 'true' ? true : false;
|
||||
})))
|
||||
|
||||
// Authentication
|
||||
.get('/api/session', Util.promisify(async (req) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue