From ce81de43e6fd015479175938151f0b2a43a826d9 Mon Sep 17 00:00:00 2001 From: velvettear Date: Thu, 10 Feb 2022 21:00:59 +0100 Subject: [PATCH] extended '/info' endpoint --- libs/info.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/info.js b/libs/info.js index 2d6e053..85be06c 100644 --- a/libs/info.js +++ b/libs/info.js @@ -18,13 +18,17 @@ function getLoadAverage(index) { } function getArchitecture() { - return os.arch; + return os.arch(); } function getOperatingSystem() { return os.release(); } +function getType() { + return os.type(); +} + function getPlatform() { return os.platform(); } @@ -54,6 +58,7 @@ function getHostInfo() { load: getLoadAverage(), arch: getArchitecture(), os: getOperatingSystem(), + type: getType(), platform: getPlatform(), kernel: getKernelVersion(), cpu: getCpuInfo(), @@ -67,6 +72,7 @@ module.exports = { getLoadAverage, getArchitecture, getOperatingSystem, + getType, getPlatform, getKernelVersion, getCpuInfo,