diff options
-rw-r--r-- | backend/src/jobs/delete-users.ts | 4 | ||||
-rw-r--r-- | backend/src/utils/misc.ts | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/backend/src/jobs/delete-users.ts b/backend/src/jobs/delete-users.ts index 2d8e57b47..f9f9121da 100644 --- a/backend/src/jobs/delete-users.ts +++ b/backend/src/jobs/delete-users.ts @@ -59,9 +59,7 @@ async function deleteUsers(): Promise<void> { return; } - await mapLimit(softDeletedUsers, CONCURRENT_DELETIONS, async (user) => { - await deleteUser(user.uid); - }); + await mapLimit(softDeletedUsers, CONCURRENT_DELETIONS, async (user) => deleteUser(user.uid)); } export default new CronJob(CRON_SCHEDULE, deleteUsers); diff --git a/backend/src/utils/misc.ts b/backend/src/utils/misc.ts index a5ee6e1dd..1057a15d3 100644 --- a/backend/src/utils/misc.ts +++ b/backend/src/utils/misc.ts @@ -344,7 +344,7 @@ export function replaceObjectIds<T extends { _id: ObjectId }>( return data.map((it) => replaceObjectId(it)); } -type MapLimitIteratee<T, V> = (element: T, index: number) => V; +type MapLimitIteratee<T, V> = (element: T, index: number) => Promise<V>; export async function mapLimit<T, V>( input: T[], |