mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 11:27:46 +01:00
add system information
This commit is contained in:
parent
298c618150
commit
7afbbd03f8
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,7 @@ function getJson(str) {
|
|||
}
|
||||
|
||||
const pkg = require("../../../package.json");
|
||||
const os = require('os');
|
||||
const cnf = require("../../../config.json");
|
||||
const innertube = require("../libpoketube-youtubei-objects.json");
|
||||
|
||||
|
@ -215,6 +216,9 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
|||
.then((res) => res.text())
|
||||
.then((txt) => getJson(txt));
|
||||
|
||||
const cpus = os.cpus();
|
||||
const totalMemory = os.totalmem();
|
||||
|
||||
const response = {
|
||||
pt_version: {
|
||||
version:versmol,
|
||||
|
@ -226,6 +230,10 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) {
|
|||
vernum: versionnumber,
|
||||
codename,
|
||||
config:cnf,
|
||||
system:{
|
||||
ram:`${totalMemory / (1024 * 1024 * 1024)} GB`,
|
||||
cpu:cpus[0].model,
|
||||
},
|
||||
packages: {
|
||||
libpt: version,
|
||||
node: process.version,
|
||||
|
|
Loading…
Reference in a new issue