fix: 🐛 server stats setting, meta fetching
This commit is contained in:
parent
5e85d0761e
commit
364266da0a
|
@ -21,8 +21,10 @@ export default function () {
|
|||
ev.emit(`serverStatsLog:${x.id}`, log.slice(0, x.length || 50));
|
||||
});
|
||||
|
||||
const meta = fetchMeta();
|
||||
if (!meta.enableServerMachineStats) return;
|
||||
fetchMeta().then((meta) => {
|
||||
if (!meta.enableServerMachineStats) return;
|
||||
}
|
||||
);
|
||||
|
||||
async function tick() {
|
||||
const cpu = await cpuUsage();
|
||||
|
|
|
@ -468,6 +468,7 @@ let enableIdenticonGeneration: boolean = $ref(false);
|
|||
|
||||
async function init() {
|
||||
const meta = await os.api("admin/meta");
|
||||
if (!meta) throw new Error("No meta");
|
||||
name = meta.name;
|
||||
description = meta.description;
|
||||
tosUrl = meta.tosUrl;
|
||||
|
|
Loading…
Reference in New Issue