Merge pull request #1809 from bluewave-labs/fix/settings-version-request
fox: remove auth header for version request
This commit is contained in:
1 file changed
+16
-13
+16
-13
@@ -177,8 +177,7 @@ class NetworkService {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async getMonitorsByTeamId(config) {
|
async getMonitorsByTeamId(config) {
|
||||||
const { teamId, limit, types, page, rowsPerPage, filter, field, order } =
|
const { teamId, limit, types, page, rowsPerPage, filter, field, order } = config;
|
||||||
config;
|
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
|
|
||||||
if (limit) params.append("limit", limit);
|
if (limit) params.append("limit", limit);
|
||||||
@@ -224,7 +223,8 @@ class NetworkService {
|
|||||||
if (config.normalize) params.append("normalize", config.normalize);
|
if (config.normalize) params.append("normalize", config.normalize);
|
||||||
|
|
||||||
return this.axiosInstance.get(
|
return this.axiosInstance.get(
|
||||||
`/monitors/stats/${config.monitorId}?${params.toString()}`);
|
`/monitors/stats/${config.monitorId}?${params.toString()}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getHardwareDetailsByMonitorId(config) {
|
async getHardwareDetailsByMonitorId(config) {
|
||||||
@@ -232,7 +232,8 @@ class NetworkService {
|
|||||||
if (config.dateRange) params.append("dateRange", config.dateRange);
|
if (config.dateRange) params.append("dateRange", config.dateRange);
|
||||||
|
|
||||||
return this.axiosInstance.get(
|
return this.axiosInstance.get(
|
||||||
`/monitors/hardware/details/${config.monitorId}?${params.toString()}`);
|
`/monitors/hardware/details/${config.monitorId}?${params.toString()}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
async getUptimeDetailsById(config) {
|
async getUptimeDetailsById(config) {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
@@ -240,7 +241,8 @@ class NetworkService {
|
|||||||
if (config.normalize) params.append("normalize", config.normalize);
|
if (config.normalize) params.append("normalize", config.normalize);
|
||||||
|
|
||||||
return this.axiosInstance.get(
|
return this.axiosInstance.get(
|
||||||
`/monitors/uptime/details/${config.monitorId}?${params.toString()}`);
|
`/monitors/uptime/details/${config.monitorId}?${params.toString()}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -526,10 +528,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async requestInvitationToken(config) {
|
async requestInvitationToken(config) {
|
||||||
return this.axiosInstance.post(
|
return this.axiosInstance.post(`/invite`, { email: config.email, role: config.role });
|
||||||
`/invite`,
|
|
||||||
{ email: config.email, role: config.role },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -799,7 +798,12 @@ class NetworkService {
|
|||||||
*/
|
*/
|
||||||
async fetchGithubLatestRelease() {
|
async fetchGithubLatestRelease() {
|
||||||
return this.axiosInstance.get(
|
return this.axiosInstance.get(
|
||||||
"https://api.github.com/repos/bluewave-labs/bluewave-uptime/releases/latest"
|
"https://api.github.com/repos/bluewave-labs/bluewave-uptime/releases/latest",
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
Authorization: null,
|
||||||
|
},
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -843,7 +847,7 @@ class NetworkService {
|
|||||||
onOpen?.();
|
onOpen?.();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.eventSource.addEventListener("open", (e) => { });
|
this.eventSource.addEventListener("open", (e) => {});
|
||||||
|
|
||||||
this.eventSource.onmessage = (event) => {
|
this.eventSource.onmessage = (event) => {
|
||||||
const data = JSON.parse(event.data);
|
const data = JSON.parse(event.data);
|
||||||
@@ -870,8 +874,7 @@ class NetworkService {
|
|||||||
|
|
||||||
subscribeToDistributedUptimeDetails(config) {
|
subscribeToDistributedUptimeDetails(config) {
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
const { monitorId, onUpdate, onOpen, onError, dateRange, normalize } =
|
const { monitorId, onUpdate, onOpen, onError, dateRange, normalize } = config;
|
||||||
config;
|
|
||||||
if (dateRange) params.append("dateRange", dateRange);
|
if (dateRange) params.append("dateRange", dateRange);
|
||||||
if (normalize) params.append("normalize", normalize);
|
if (normalize) params.append("normalize", normalize);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user