From e5181727fe68078593a1c37a59c1b72425fbb316 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 30 Dec 2024 14:58:20 -0800 Subject: [PATCH] Add netwokr request for uptime details --- Client/src/Utils/NetworkService.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Client/src/Utils/NetworkService.js b/Client/src/Utils/NetworkService.js index 71cbe9670..7854fec7a 100644 --- a/Client/src/Utils/NetworkService.js +++ b/Client/src/Utils/NetworkService.js @@ -242,6 +242,18 @@ class NetworkService { ); } + async getUptimeDetailsById(config) { + const params = new URLSearchParams(); + if (config.dateRange) params.append("dateRange", config.dateRange); + if (config.normalize) params.append("normalize", config.normalize); + + return this.axiosInstance.get(`/monitors/uptime/details/${config.monitorId}`, { + headers: { + Authorization: `Bearer ${config.authToken}`, + }, + }); + } + /** * ************************************ * Updates a single monitor