Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
postKV(projectId, data) {
const { id } = data;
if (id) {
return axios.put(`/devops/v1/projects/${projectId}/secret`, JSON.stringify(data));
} else {
return axios.post(`/devops/v1/projects/${projectId}/secret`, JSON.stringify(data));
}
},
createData(projectId, data) {
if (data.get('resourceId')) {
return axios.put(`/devops/v1/projects/${projectId}/customize_resource`,
data, { headers: { 'Content-Type': 'multipart/form-data' } });
} else {
return axios.post(`/devops/v1/projects/${projectId}/customize_resource`,
data, { headers: { 'Content-Type': 'multipart/form-data' } });
}
},
}));
effectEnv(projectId, id, target) {
return axios.put(`/devops/v1/projects/${projectId}/envs/${id}/active?active=${target}`);
},
updateData = (projectId, data) => axios.put(`/devops/v1/projects/${projectId}/notification`, JSON.stringify(data));