2022-04-28 08:19:20 +02:00
|
|
|
import ServerStatus from '../interfaces/server-status.model';
|
2022-04-26 08:10:07 +02:00
|
|
|
|
2022-05-09 08:28:54 +02:00
|
|
|
const ENDPOINT = `/api/status`;
|
2022-04-26 08:10:07 +02:00
|
|
|
|
|
|
|
class ServerStatusService {
|
|
|
|
public static async getStatus(): Promise<ServerStatus> {
|
|
|
|
const response = await fetch(ENDPOINT);
|
|
|
|
const status = await response.json();
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ServerStatusService;
|