Skip to content

Instantly share code, notes, and snippets.

@rustemkk
Created April 26, 2017 10:10
Show Gist options
  • Save rustemkk/8833e5c97daba034f2b040c98c767e64 to your computer and use it in GitHub Desktop.
Save rustemkk/8833e5c97daba034f2b040c98c767e64 to your computer and use it in GitHub Desktop.
if (emails && emails.length) {
({err, res: userInviter} = await to(User.findById(userId)));
if (err) {
return Response.err(err);
}
({ err, res } = await to(
_.map(emails, email => CalendarService.inviteByEmail(email, userInviter, event.title))
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment