fix: Credentials cron for DelegationCredential not working (#21239)
* Remove unused return statement * Fix return from fn instead of continuing the loop * Ensure userId is set for existing records on update
This commit is contained in:
1 parent
22e3338709
commit
caf184151d
4 files changed
+23
-11
No files matched your search
@@ -826,7 +826,6 @@ export default class GoogleCalendarService implements Calendar {
|
||||
const primaryCalendar = this.filterPrimaryCalendar(cals);
|
||||
if (!primaryCalendar) return [];
|
||||
return [primaryCalendar.id];
|
||||
return cals.reduce((c, cal) => (cal.id ? [...c, cal.id] : c), [] as string[]);
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
@@ -145,6 +145,8 @@ export class CalendarCacheRepository implements ICalendarCacheRepository {
|
||||
},
|
||||
},
|
||||
update: {
|
||||
// Ensure that on update userId is also set(It handles the case where userId is not set for legacy records)
|
||||
userId,
|
||||
value,
|
||||
expiresAt: new Date(Date.now() + CACHING_TIME),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user