owncast/web/services/status-service.ts

14 lines
335 B
TypeScript
Raw Normal View History

2022-05-12 08:31:31 +02:00
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;