mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-21 07:02:32 +02:00
Merge pull request #395 from OpenSignLabs/fix_dailyemailquota
fix: dailyemailquota not updating for user and default value not updating of checkbox in API
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
async function DocumentBeforesave(request) {
|
||||
if (!request.original) {
|
||||
const TimeToCompleteDays = request.object.get('TimeToCompleteDays') || 15;
|
||||
const RemindOnceInEvery = request?.object?.get('RemindOnceInEvery') || 5;
|
||||
const AutoReminder = request?.object?.get('AutomaticReminders') || false;
|
||||
const reminderCount = TimeToCompleteDays / RemindOnceInEvery;
|
||||
if (AutoReminder && reminderCount > 15) {
|
||||
throw new Parse.Error(Parse.Error.INVALID_QUERY, 'only 15 reminder allowed');
|
||||
}
|
||||
}
|
||||
try {
|
||||
// below code is used to update document when user sent document or self signed
|
||||
const document = request.object;
|
||||
|
||||
Reference in New Issue
Block a user