From a2f0a6fa6e30c642ec243a18f58bf53da3c0083e Mon Sep 17 00:00:00 2001 From: tgpethan Date: Fri, 21 Feb 2020 00:32:52 +0000 Subject: [PATCH] Add get-info api endpoint --- EUS.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/EUS.js b/EUS.js index d58c451..2a006fa 100644 --- a/EUS.js +++ b/EUS.js @@ -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();