Add get-info api endpoint

This commit is contained in:
tgpethan 2020-02-21 00:32:52 +00:00
parent a72b77b32b
commit a2f0a6fa6e
1 changed files with 9 additions and 0 deletions

9
EUS.js
View File

@ -117,6 +117,15 @@ module.exports = {
}
}
if (req.url.split("?")[0] == "/api/get-info") {
isAPI = true;
let jsonaa = {
version: global.internals.version,
instance: config["server"]["instance_type"]
};
return res.end(JSON.stringify(jsonaa));
}
if (!isAPI) {
// Register the time at the start of the request
d = new Date();