Add get-info api endpoint

This commit is contained in:
tgpethan 2020-02-21 00:32:52 +00:00
parent a72b77b32b
commit a2f0a6fa6e

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) { if (!isAPI) {
// Register the time at the start of the request // Register the time at the start of the request
d = new Date(); d = new Date();