diff --git a/Client/src/Features/PageSpeedMonitor/pageSpeedMonitorSlice.js b/Client/src/Features/PageSpeedMonitor/pageSpeedMonitorSlice.js index 87e758bf3..0322a5143 100644 --- a/Client/src/Features/PageSpeedMonitor/pageSpeedMonitorSlice.js +++ b/Client/src/Features/PageSpeedMonitor/pageSpeedMonitorSlice.js @@ -15,7 +15,7 @@ export const createPageSpeed = createAsyncThunk( const { authToken, monitor } = data; const res = await networkService.createMonitor({ authToken: authToken, - moniotr: monitor, + monitor: monitor, }); return res.data; } catch (error) { @@ -36,7 +36,10 @@ export const getPagespeedMonitorById = createAsyncThunk( async (data, thunkApi) => { try { const { authToken, monitorId } = data; - const res = await networkService.getMonitorByid({ authToken, monitorId }); + const res = await networkService.getMonitorById({ + authToken: authToken, + monitorId: monitorId, + }); return res.data; } catch (error) { if (error.response && error.response.data) { diff --git a/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js b/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js index 3d1b619b5..f6c3cb10a 100644 --- a/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js +++ b/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js @@ -36,7 +36,10 @@ export const getUptimeMonitorById = createAsyncThunk( async (data, thunkApi) => { try { const { authToken, monitorId } = data; - const res = await networkService.getMonitorByid({ authToken, monitorId }); + const res = await networkService.getMonitorById({ + authToken: authToken, + monitorId: monitorId, + }); return res.data; } catch (error) { if (error.response && error.response.data) { diff --git a/Client/src/Pages/Monitors/Details/PaginationTable/index.jsx b/Client/src/Pages/Monitors/Details/PaginationTable/index.jsx index 1f2a2a293..8538ac169 100644 --- a/Client/src/Pages/Monitors/Details/PaginationTable/index.jsx +++ b/Client/src/Pages/Monitors/Details/PaginationTable/index.jsx @@ -42,7 +42,7 @@ const PaginationTable = ({ monitorId, dateRange }) => { try { const res = await networkService.getChecksByMonitor({ authToken: authToken, - moniotrId: monitorId, + monitoirId: monitorId, sortOrder: "desc", limit: null, dateRange: dateRange, diff --git a/Client/src/Utils/NetworkService.js b/Client/src/Utils/NetworkService.js index e5fd68111..50a6a095a 100644 --- a/Client/src/Utils/NetworkService.js +++ b/Client/src/Utils/NetworkService.js @@ -30,7 +30,7 @@ class NetworkService { * @returns {Promise} The response from the axios GET request. */ - async getMonitorByid(config) { + async getMonitorById(config) { return this.axiosInstance.get(`/monitors/${config.monitorId}`, { headers: { Authorization: `Bearer ${config.authToken}`,