Add floating windows and btop system monitor
This commit is contained in:
1 parent
fd0b3b20a2
commit
201a1e0914
23 files changed
+1049
-36
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { error, json } from '@sveltejs/kit';
|
||||
import { getBtopData } from '#lib/server/btop';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
export const GET: RequestHandler = async () => {
|
||||
const data = await getBtopData();
|
||||
if (!data) error(503, 'System monitor data is unavailable');
|
||||
return json(data, { headers: { 'Cache-Control': 'public, max-age=600' } });
|
||||
};
|
||||
Reference in new issue
Block a user