legacy put -> patch
This commit is contained in:
1 parent
c54582ca70
commit
7cb866ce4a
1 file changed
+12
-12
@@ -230,7 +230,7 @@ class NetworkService {
|
|||||||
async updateMonitor(config) {
|
async updateMonitor(config) {
|
||||||
const { monitorId, updatedFields } = config;
|
const { monitorId, updatedFields } = config;
|
||||||
const payload = updatedFields;
|
const payload = updatedFields;
|
||||||
return this.axiosInstance.put(`/monitors/${monitorId}`, payload, {
|
return this.axiosInstance.patch(`/monitors/${monitorId}`, payload, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
@@ -378,7 +378,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async updateUser(config) {
|
async updateUser(config) {
|
||||||
return this.axiosInstance.put(`/auth/user`, config.form);
|
return this.axiosInstance.patch(`/auth/user`, config.form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -611,7 +611,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async updateCheckStatus(config) {
|
async updateCheckStatus(config) {
|
||||||
return this.axiosInstance.put(`/checks/check/${config.checkId}`, {
|
return this.axiosInstance.patch(`/checks/check/${config.checkId}`, {
|
||||||
ack: config.ack,
|
ack: config.ack,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -629,7 +629,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async updateMonitorChecksStatus(config) {
|
async updateMonitorChecksStatus(config) {
|
||||||
return this.axiosInstance.put(`/checks/monitor/${config.monitorId}`, {
|
return this.axiosInstance.patch(`/checks/monitor/${config.monitorId}`, {
|
||||||
ack: config.ack,
|
ack: config.ack,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -646,7 +646,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async updateAllChecksStatus(config) {
|
async updateAllChecksStatus(config) {
|
||||||
return this.axiosInstance.put(`/checks/team/`, {
|
return this.axiosInstance.patch(`/checks/team/`, {
|
||||||
ack: config.ack,
|
ack: config.ack,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -663,7 +663,7 @@ class NetworkService {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async updateChecksTTL(config) {
|
async updateChecksTTL(config) {
|
||||||
return this.axiosInstance.put(
|
return this.axiosInstance.patch(
|
||||||
`/checks/team/ttl`,
|
`/checks/team/ttl`,
|
||||||
{ ttl: config.ttl },
|
{ ttl: config.ttl },
|
||||||
{
|
{
|
||||||
@@ -705,7 +705,7 @@ class NetworkService {
|
|||||||
* @returns {Promise<AxiosResponse>} The response from the axios POST request.
|
* @returns {Promise<AxiosResponse>} The response from the axios POST request.
|
||||||
*/
|
*/
|
||||||
async updateAppSettings(config) {
|
async updateAppSettings(config) {
|
||||||
return this.axiosInstance.put(`/settings`, config.settings, {
|
return this.axiosInstance.patch(`/settings`, config.settings, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
@@ -775,7 +775,7 @@ class NetworkService {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async editMaintenanceWindow(config) {
|
async editMaintenanceWindow(config) {
|
||||||
return this.axiosInstance.put(
|
return this.axiosInstance.patch(
|
||||||
`/maintenance-window/${config.maintenanceWindowId}`,
|
`/maintenance-window/${config.maintenanceWindowId}`,
|
||||||
config.maintenanceWindow,
|
config.maintenanceWindow,
|
||||||
{
|
{
|
||||||
@@ -955,7 +955,7 @@ class NetworkService {
|
|||||||
return this.axiosInstance.post(`/status-page`, fd, {});
|
return this.axiosInstance.post(`/status-page`, fd, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.axiosInstance.put(`/status-page/${id}`, fd, {});
|
return this.axiosInstance.patch(`/status-page/${id}`, fd, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteStatusPage(config) {
|
async deleteStatusPage(config) {
|
||||||
@@ -1125,7 +1125,7 @@ class NetworkService {
|
|||||||
|
|
||||||
async editUser(config) {
|
async editUser(config) {
|
||||||
const { userId, user } = config;
|
const { userId, user } = config;
|
||||||
return this.axiosInstance.put(`auth/users/${userId}`, user, {
|
return this.axiosInstance.patch(`auth/users/${userId}`, user, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
@@ -1134,7 +1134,7 @@ class NetworkService {
|
|||||||
|
|
||||||
async changePasswordByAdmin(config) {
|
async changePasswordByAdmin(config) {
|
||||||
const { userId, passwordForm } = config;
|
const { userId, passwordForm } = config;
|
||||||
return this.axiosInstance.put(`auth/users/${userId}/password`, passwordForm, {
|
return this.axiosInstance.patch(`auth/users/${userId}/password`, passwordForm, {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
@@ -1164,7 +1164,7 @@ class NetworkService {
|
|||||||
resolveIncidentManually = async (incidentId, options = {}) => {
|
resolveIncidentManually = async (incidentId, options = {}) => {
|
||||||
const body = {};
|
const body = {};
|
||||||
if (options.comment) body.comment = options.comment;
|
if (options.comment) body.comment = options.comment;
|
||||||
return this.axiosInstance.put(`/incidents/${incidentId}/resolve`, body);
|
return this.axiosInstance.patch(`/incidents/${incidentId}/resolve`, body);
|
||||||
};
|
};
|
||||||
|
|
||||||
getIncidentSummary = async (config = {}) => {
|
getIncidentSummary = async (config = {}) => {
|
||||||
|
|||||||
Reference in new issue
Block a user