mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 18:07:31 -07:00
fix: 🐛 server stats setting, meta fetching
This commit is contained in:
parent
9c8447c70a
commit
4d8853b7f5
2 changed files with 5 additions and 2 deletions
|
@ -21,8 +21,10 @@ export default function () {
|
||||||
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
|
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
|
||||||
});
|
});
|
||||||
|
|
||||||
const meta = fetchMeta();
|
fetchMeta().then((meta) => {
|
||||||
if (!meta.enableServerMachineStats) return;
|
if (!meta.enableServerMachineStats) return;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
async function tick() {
|
async function tick() {
|
||||||
const cpu = await cpuUsage();
|
const cpu = await cpuUsage();
|
||||||
|
|
|
@ -468,6 +468,7 @@ let enableIdenticonGeneration: boolean = $ref(false);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api("admin/meta");
|
const meta = await os.api("admin/meta");
|
||||||
|
if (!meta) throw new Error("No meta");
|
||||||
name = meta.name;
|
name = meta.name;
|
||||||
description = meta.description;
|
description = meta.description;
|
||||||
tosUrl = meta.tosUrl;
|
tosUrl = meta.tosUrl;
|
||||||
|
|
Loading…
Reference in a new issue