daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async register(email, password, isAgreed, voucher) {
  2.     try {
  3.         const user = await UserService.register(email, password, isAgreed);
  4.         await Promise.all([
  5.             CustomerService.create(user._id),
  6.             EmailService.sendWelcomeEmail(email),
  7.             MailChimpService.register(email),
  8.             VoucherService.applyVoucher(user._id, voucher),
  9. ]);
  10.         return {
  11.             token: user.token,
  12.         }
  13.     } catch (err) {
  14.         throw err;
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top