Skip to content

Commit

Permalink
Merge pull request #446 from openstad/fix/broken-notification-ruleset
Browse files Browse the repository at this point in the history
Fix/broken notification ruleset
  • Loading branch information
Badmuts committed Feb 27, 2024
2 parents eabfe22 + e67605c commit 727fc1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cms/app.js
Expand Up @@ -43,7 +43,7 @@ let sites = {};
let sitesById = {};
let sitesResponse = [];
const aposStartingUp = {};
const REFRESH_SITES_INTERVAL = 60000 * 5;
const REFRESH_SITES_INTERVAL = 60000 * 15;


if (process.env.REQUEST_LOGGING === 'ON') {
Expand Down
20 changes: 17 additions & 3 deletions packages/cms/lib/modules/resource-form-widgets/lib/api.js
Expand Up @@ -21,12 +21,19 @@ module.exports = async function(self, options) {
await self.addOrUpdateNotification(item, 'User');
} catch (error) {
console.error(
'something went wrong when update admin confirmation settings to api',
'something went wrong when update user confirmation settings to api',
error.message
);
}
} else {
await self.disableNotificationRuleSet(`User-${item.formName}`);
try {
await self.disableNotificationRuleSet(`User-${item.formName}`);
} catch (error) {
console.error(
'something went wrong when disabling user confirmation settings to api',
error.message
);
}
}

if (item.confirmationEnabledAdmin) {
Expand All @@ -39,7 +46,14 @@ module.exports = async function(self, options) {
);
}
} else {
await self.disableNotificationRuleSet(`Admin-${item.formName}`);
try {
await self.disableNotificationRuleSet(`Admin-${item.formName}`);
} catch (error) {
console.error(
'something went wrong when disabling admin confirmation settings to api',
error.message
);
}
}
}
})
Expand Down

1 comment on commit 727fc1a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/frontend:master-727fc1a

Please sign in to comment.