owncast/web/services/status-service.ts
2022-05-08 23:28:54 -07:00

14 lines
331 B
TypeScript

import ServerStatus from '../interfaces/server-status.model';
const ENDPOINT = `/api/status`;
class ServerStatusService {
public static async getStatus(): Promise<ServerStatus> {
const response = await fetch(ENDPOINT);
const status = await response.json();
return status;
}
}
export default ServerStatusService;