Skip to content

Commit

Permalink
chore: Refactor bulkUpdate function in mailing.controller.js
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-bear committed Jul 11, 2024
1 parent 7d3e6e7 commit 5103ce0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/server/mailing/mailing.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,10 @@ async function bulkUpdate(req, res) {
return mailing.save();
});
await Promise.all(updateQueries);
const [mailings, tags] = await Promise.all([
Mailings.findForApi(mailingQuery),
Mailings.findTags(modelsUtils.addStrictGroupFilter(req.user, {})),
]);
const mailings = await Mailings.findForApi(mailingQuery);

res.json({
meta: { tags },
meta: { tags: [] },
items: mailings,
});
}
Expand Down

0 comments on commit 5103ce0

Please sign in to comment.