From cca2ed6991399137b000960d2d893f2e09b39d67 Mon Sep 17 00:00:00 2001 From: tgpethan Date: Mon, 15 Jun 2020 12:10:06 +0100 Subject: [PATCH] Remove lexical declaration from cases --- EUS.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/EUS.js b/EUS.js index 2ae4fc8..376253c 100644 --- a/EUS.js +++ b/EUS.js @@ -212,6 +212,7 @@ module.exports = { } function handleAPI(req, res) { + let jsonaa = {}, filesaa = 0, spaceaa = 0; switch (req.url.split("?")[0]) { // Status check to see the onlint status of EUS // Used by ESL to make sure EUS is online @@ -224,9 +225,9 @@ function handleAPI(req, res) { s : Values [0,1] */ case "/api/get-stats": - const filesaa = req.query["f"], + filesaa = req.query["f"]; spaceaa = req.query["s"]; - let jsonaa = {}; + jsonaa = {}; // If total files is asked for if (filesaa == 1) { let total = 0; @@ -281,11 +282,10 @@ function handleAPI(req, res) { // Information API case "/api/get-info": - let jsona = { + return res.end(JSON.stringify({ version: global.internals.version, instance: config["server"]["instance_type"] - }; - return res.end(JSON.stringify(jsona)); + })); } }