mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 07:25:24 +02:00
filter mass mails
This commit is contained in:
parent
6bfe13bb3d
commit
b2c7371913
2 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,7 @@ module.exports = {
|
|||
request: this.req,
|
||||
})
|
||||
.intercept('userAlreadyCardMember', () => Errors.USER_ALREADY_CARD_MEMBER);
|
||||
await sendUserEmails({ to: [inputs.userId], subject: 'b', text: 'c' });
|
||||
await sendUserEmails({ to: [inputs.userId], subject: 'משימה חדשה ניתנה', text: 'c' });
|
||||
return {
|
||||
item: cardMembership,
|
||||
};
|
||||
|
|
|
@ -28,8 +28,8 @@ const sendEmail = async ({ to, subject, text, cc }) => {
|
|||
}
|
||||
};
|
||||
|
||||
const sendUserEmails = async ({ ids, subject, text, cc }) => {
|
||||
const users = await sails.helpers.users.getMany(ids);
|
||||
const sendUserEmails = async ({ to, subject, text, cc }) => {
|
||||
const users = await sails.helpers.users.getMany({ id: { in: to } });
|
||||
return sendEmail({ to: users.map((u) => u.email), subject, text, cc });
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue