Add deleteConfig to API

This commit is contained in:
Mel O'Hagan 2022-05-12 16:57:05 +01:00
parent ccd2b91e8e
commit 827f78f8a0
1 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,17 @@ export const buildConfigEndpoints = API => ({
})
},
/**
* Deletes a global config
* @param id the id of the config to delete
* @param rev the revision of the config to delete
*/
deleteConfig: async ({ id, rev }) => {
return await API.delete({
url: `/api/global/configs/${id}/${rev}`
})
},
/**
* Gets the config for a certain tenant.
* @param tenantId the tenant ID to get the config for