Feat: Ignore TLS/SSL Error Option in Config

This commit is contained in:
Br0wnHammer committed 2025-05-09 01:35:27 +05:30
1 parent c466edb751
commit 4d9e47d93a
3 files changed
+42 -20

No files matched your search

+4 -15
View File
@@ -52,7 +52,7 @@ class NetworkService {
// Return an empty resolved promise to stop the error propagation
return Promise.reject(error);
}
// Handle authentication errors
if (error.response && error.response.status === 401) {
@@ -267,17 +267,8 @@ class NetworkService {
* @returns {Promise<AxiosResponse>} The response from the axios PUT request.
*/
async updateMonitor(config) {
const { monitorId, monitor, updatedFields } = config;
const payload = updatedFields ?? {
name: monitor.name,
description: monitor.description,
interval: monitor.interval,
notifications: monitor.notifications,
matchMethod: monitor.matchMethod,
expectedValue: monitor.expectedValue,
jsonPath: monitor.jsonPath,
...(monitor.type === "port" && { port: monitor.port }),
};
const { monitorId, updatedFields } = config;
const payload = updatedFields;
return this.axiosInstance.put(`/monitors/${monitorId}`, payload, {
headers: {
"Content-Type": "application/json",
@@ -515,8 +506,6 @@ class NetworkService {
return this.axiosInstance.get("/auth/users/superadmin");
}
/**
* ************************************
* Get all users
@@ -933,7 +922,7 @@ class NetworkService {
onOpen?.();
};
this.eventSource.addEventListener("open", (e) => { });
this.eventSource.addEventListener("open", (e) => {});
this.eventSource.onmessage = (event) => {
const data = JSON.parse(event.data);