fix automation components and rework some views and urls

This commit is contained in:
sadnub
2021-10-22 13:13:18 -04:00
parent aa4572f4d3
commit e87a42ebb6
8 changed files with 81 additions and 160 deletions

View File

@@ -5,4 +5,11 @@ const baseUrl = "/automation"
export async function sendPatchPolicyReset(payload) {
const { data } = await axios.post(`${baseUrl}/patchpolicy/reset/`, payload)
return data
}
export async function fetchPolicyChecks(id) {
try {
const { data } = await axios.get(`${baseUrl}/policies/${id}/checks/`)
return data
} catch (e) { console.error(e) }
}