diff --git a/src/components/Structure/Footer.vue b/src/components/Structure/Footer.vue index 44a951b..c088c7f 100644 --- a/src/components/Structure/Footer.vue +++ b/src/components/Structure/Footer.vue @@ -10,9 +10,9 @@ Etat des serveurs
- CBS - XML - ITEM + CBS + XML + ITEM
@@ -36,20 +36,23 @@ diff --git a/src/service/StatusService.js b/src/service/StatusService.js new file mode 100644 index 0000000..2d1a1a7 --- /dev/null +++ b/src/service/StatusService.js @@ -0,0 +1,20 @@ +import axios from 'axios'; + +export class StatusService { + constructor() { + this.client = axios.create({ + baseURL: "https://api.uptimerobot.com/" + }); + } + + async getStatusBaseXML(){ + let data = {"api_key":"ur707639-b082a50474d1cfbe940438bc", "monitors":"782344734"} + return this.client.post(`v2/getMonitors`,data).then( + response => { + return response.data.monitors[0].status === 2; + }) + } + +} + +export default new StatusService()