feat(homelab)!: migrate to svelte kit, add more server stats endpoints
This commit is contained in:
@@ -2,13 +2,14 @@ type StatsResponse = {
|
||||
status: string;
|
||||
players_online: number;
|
||||
max_players: number;
|
||||
uptime: string;
|
||||
uptime: {
|
||||
seconds: number;
|
||||
started_at: string;
|
||||
};
|
||||
world_size: string;
|
||||
};
|
||||
|
||||
export const fetchStats = async () => {
|
||||
const response = await fetch(
|
||||
"http://localhost:5173/api/minecraft-server-stats",
|
||||
);
|
||||
const response = await fetch("/api/minecraft-server-stats");
|
||||
return (await response.json()) as StatsResponse;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user