Got index server list working

This commit is contained in:
Fishandchips321 2026-02-22 19:30:12 +00:00
parent 36d99b1e35
commit 271cf1f407
19 changed files with 445 additions and 67 deletions

View file

@ -1,6 +1,8 @@
import axios from "axios";
import { apiUrl } from "./api";
export interface Server {
name: string;
name?: string;
id: string;
online?: boolean;
owner: string;
@ -8,18 +10,7 @@ export interface Server {
}
export const getServerList = async (): Promise<Array<Server>> => {
return [{
id: "asdf",
name: "test server",
owner: "meeeee",
url: "https://jellyfin.foxhawk.co.uk",
online: true
},
{
id: "qwer",
name: "test server 2",
owner: "someone else",
url: "https://jellyfin.foxhawk.co.uk",
online: true
}];
const response = await axios.get<Array<Server>>(`${apiUrl}/servers`);
return response.data;
}