diff --git a/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js b/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js index 05ec9b316..81e4d4b1b 100644 --- a/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js +++ b/Client/src/Features/UptimeMonitors/uptimeMonitorsSlice.js @@ -32,7 +32,7 @@ export const createUptimeMonitor = createAsyncThunk( ); export const checkEndpointResolution = createAsyncThunk( - "monitors/checkEnpoint", + "monitors/checkEndpoint", async(data, thunkApi) => { try{ const { authToken, monitorURL } = data; diff --git a/Client/src/Pages/Monitors/CreateMonitor/index.jsx b/Client/src/Pages/Monitors/CreateMonitor/index.jsx index 50d4e3195..26a233800 100644 --- a/Client/src/Pages/Monitors/CreateMonitor/index.jsx +++ b/Client/src/Pages/Monitors/CreateMonitor/index.jsx @@ -385,7 +385,7 @@ const CreateMonitor = () => { onClick={handleCreateMonitor} disabled={Object.keys(errors).length !== 0 && true} > - Create Monitor + Create monitor diff --git a/Client/src/Utils/NetworkService.js b/Client/src/Utils/NetworkService.js index a9dd80731..22717b364 100644 --- a/Client/src/Utils/NetworkService.js +++ b/Client/src/Utils/NetworkService.js @@ -107,7 +107,7 @@ class NetworkService { if (monitorURL) params.append("monitorURL", monitorURL); - return this.axiosInstance.get(`/monitors/check-endpoint/url?${params.toString()}`, { + return this.axiosInstance.get(`/monitors/resolution/url?${params.toString()}`, { headers: { Authorization: `Bearer ${authToken}`, "Content-Type": "application/json", diff --git a/Server/openapi.json b/Server/openapi.json index aeb7285a8..ff13498ea 100644 --- a/Server/openapi.json +++ b/Server/openapi.json @@ -845,7 +845,7 @@ ] } }, - "/monitors//check-endpoint/url": { + "/monitors/resolution/url": { "get": { "tags": ["monitors"], "description": "Check DNS resolution for a given URL", diff --git a/Server/routes/monitorRoute.js b/Server/routes/monitorRoute.js index c3f695556..67ab8a5e6 100644 --- a/Server/routes/monitorRoute.js +++ b/Server/routes/monitorRoute.js @@ -19,7 +19,7 @@ router.post( ); router.get( - "/check-endpoint/url", + "/resolution/url", isAllowed(["admin", "superadmin"]), monitorController.checkEndpointResolution )