Move time getting to correct place
This commit is contained in:
parent
ee896da2aa
commit
378438e4aa
1 changed files with 2 additions and 2 deletions
4
EUS.js
4
EUS.js
|
@ -281,8 +281,6 @@ function handleAPI(req, res) {
|
||||||
sizeOfFolder = (size / 1024 / 1024 / 1024);
|
sizeOfFolder = (size / 1024 / 1024 / 1024);
|
||||||
jsonaa["space"]["usage"]["gb"] = sizeOfFolder;
|
jsonaa["space"]["usage"]["gb"] = sizeOfFolder;
|
||||||
jsonaa["space"]["usage"]["string"] = spaceToLowest(size, true);
|
jsonaa["space"]["usage"]["string"] = spaceToLowest(size, true);
|
||||||
// Send the json to the requesting client
|
|
||||||
d = new Date(); endTime = d.getTime();
|
|
||||||
diskUsage.check(__dirname, (err, data) => {
|
diskUsage.check(__dirname, (err, data) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
jsonaa["space"]["total"] = {
|
jsonaa["space"]["total"] = {
|
||||||
|
@ -293,6 +291,8 @@ function handleAPI(req, res) {
|
||||||
string: spaceToLowest(data["total"], true)
|
string: spaceToLowest(data["total"], true)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
// Send the json to the requesting client
|
||||||
|
d = new Date(); endTime = d.getTime();
|
||||||
global.modules.consoleHelper.printInfo(emoji.heavy_check, `${req.method}: ${chalk.green("[200]")} ${req.url} ${endTime - startTime}ms`);
|
global.modules.consoleHelper.printInfo(emoji.heavy_check, `${req.method}: ${chalk.green("[200]")} ${req.url} ${endTime - startTime}ms`);
|
||||||
return res.end(JSON.stringify(jsonaa));
|
return res.end(JSON.stringify(jsonaa));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue