feat: add server log preview

This commit is contained in:
2026-03-23 21:13:54 +01:00
parent c7ef3e9d27
commit 36c31fa790
6 changed files with 207 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
import { fetchServerAPI } from './base';
export async function getServerLog(
token: string,
serverId: string,
lines: number = 100
): Promise<string[]> {
const response = await fetchServerAPI<{ lines: string[] }>(
`/server/${serverId}/log?lines=${lines}`,
token
);
return response.data?.lines ?? [];
}