Update the api endpoint from /check-endpoint/url to /resolution/url

This commit is contained in:
om-3004
2024-10-17 10:18:12 +05:30
parent 9bc42cbf4f
commit d61a41fd95
5 changed files with 5 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ export const createUptimeMonitor = createAsyncThunk(
);
export const checkEndpointResolution = createAsyncThunk(
"monitors/checkEnpoint",
"monitors/checkEndpoint",
async(data, thunkApi) => {
try{
const { authToken, monitorURL } = data;

View File

@@ -385,7 +385,7 @@ const CreateMonitor = () => {
onClick={handleCreateMonitor}
disabled={Object.keys(errors).length !== 0 && true}
>
Create Monitor
Create monitor
</Button>
</Stack>
</Stack>

View File

@@ -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",

View File

@@ -845,7 +845,7 @@
]
}
},
"/monitors//check-endpoint/url": {
"/monitors/resolution/url": {
"get": {
"tags": ["monitors"],
"description": "Check DNS resolution for a given URL",

View File

@@ -19,7 +19,7 @@ router.post(
);
router.get(
"/check-endpoint/url",
"/resolution/url",
isAllowed(["admin", "superadmin"]),
monitorController.checkEndpointResolution
)