Skip to content

Commit

Permalink
forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed May 16, 2024
1 parent 2ca7158 commit 6a5ac3b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ API.v1.addRoute(
}

const eligiblePriorities = (await LivechatPriority.findByDirty().toArray()).map(({ _id }) => _id);

await LivechatPriority.resetPriorities(eligiblePriorities);
for (const _id of eligiblePriorities) {
void notifyOnLivechatPriorityChanged({ _id, name: undefined });
}

eligiblePriorities.forEach((_id) => notifyOnLivechatPriorityChanged({ _id, name: undefined }));

return API.v1.success();
},
Expand Down

0 comments on commit 6a5ac3b

Please sign in to comment.