Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/broken notification ruleset #446

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cms/app.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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