From e77d3be2a604f250719753dedcfdfc7fda3a1fb8 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 12 May 2022 16:57:05 +0100 Subject: [PATCH] Add deleteConfig to API --- packages/frontend-core/src/api/configs.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/frontend-core/src/api/configs.js b/packages/frontend-core/src/api/configs.js index 9e320f7499..3d38cf4728 100644 --- a/packages/frontend-core/src/api/configs.js +++ b/packages/frontend-core/src/api/configs.js @@ -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