Skip to content

Commit

Permalink
[DAT-3176] adds post request to maintenance/cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Maereg Sorri committed Sep 19, 2023
1 parent 60ea0bd commit 12c2f76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/main/services/setupNamespace.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const config = require('../../../config/config.json');
async function addNamespaceConfig(datastoreNamespace, onlyOpenToSuperUsersKey) {
const data = { [onlyOpenToSuperUsersKey]: false };
await postJson(`/dataStore/${datastoreNamespace}/configuration`, data);
await postJson(`/maintenance/cache`, '');
const configKeyUid = await getKeyUid('configuration');
await shareKey(configKeyUid, 'r-------');
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/shared/services/content.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export function fetchContent():Promise<string>{
export function saveContent(content) {
return putJson(getContentUrl(), { body: content }).catch(async () => {
await postJson(getContentUrl(), { body: content });
await postJson(`/maintenance/cache`, '');
let widgetId = getWidgetId();
let widgetUid = await getKeyUid(widgetId);
return shareKey(widgetUid, 'r-------');
Expand Down

0 comments on commit 12c2f76

Please # to comment.