load language before session

This commit is contained in:
pheiduck 2024-01-19 09:35:35 +01:00
parent 3dae5d64fd
commit a182efb443
2 changed files with 11 additions and 10 deletions

View file

@ -41,6 +41,10 @@ module.exports = class Server {
return RELEASE;
})))
.get('/api/lang', (Util.promisify(async () => {
return LANG;
})))
// Authentication
.get('/api/session', Util.promisify(async (req) => {
const requiresPassword = !!process.env.PASSWORD;
@ -162,9 +166,6 @@ module.exports = class Server {
const { address } = req.body;
return WireGuard.updateClientAddress({ clientId, address });
}))
.get('/api/lang', (Util.promisify(async () => {
return LANG;
})))
.listen(PORT, WEBUI_HOST, () => {
debug(`Listening on http://${WEBUI_HOST}:${PORT}`);