2022-04-28 08:19:20 +02:00
|
|
|
import ServerStatus from '../interfaces/server-status.model';
|
2022-04-26 08:10:07 +02:00
|
|
|
|
|
|
|
const ENDPOINT = `http://localhost:8080/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;
|