Make handling the api more sensible
This commit is contained in:
parent
8b063ea75f
commit
690fdad2fc
1 changed files with 35 additions and 37 deletions
6
EUS.js
6
EUS.js
|
@ -86,7 +86,8 @@ module.exports = {
|
||||||
res.set("X-Content-Type-Options", "nosniff");
|
res.set("X-Content-Type-Options", "nosniff");
|
||||||
|
|
||||||
// Check if returned value is true.
|
// Check if returned value is true.
|
||||||
if (!req.url.includes("/api/")) {
|
if (req.url.includes("/api/")) return handleAPI(req, res);
|
||||||
|
|
||||||
// Register the time at the start of the request
|
// Register the time at the start of the request
|
||||||
d = new Date();
|
d = new Date();
|
||||||
startTime = d.getTime();
|
startTime = d.getTime();
|
||||||
|
@ -120,9 +121,6 @@ module.exports = {
|
||||||
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`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
return handleAPI(req, res);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
post:function(req, res) {
|
post:function(req, res) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue