Last active
November 24, 2016 03:51
-
-
Save shaina7837/52ad8a8169e8a6365c56c756486f7ea3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let email = i.emailIds.get(); | |
email = email.map(item => { | |
let formData = Form.process(i.$("form[name="+item._id+"]")); | |
let invite_id = item._id; | |
let invite_url = Meteor.absoluteUrl() + 'testAccepted/' + invite_id; | |
BT.collections.invites.insert({"sender":currentUser, "receiver":formData.emailsid, "test_id":test_id ,"expiry_date":expiry_date ,"invite_id":invite_id ,"invite_url":invite_url, "otp":otp, invite_accepted: false}); | |
return {emails:formData.emailsId, inviteId: invite_id}; | |
}); | |
let url = Meteor.absoluteUrl() + 'testAccepted/' + email.inviteId; | |
console.log(email.emails); | |
Meteor.call('sendMail', email.emails, url, otp, function(error){ | |
if(error) console.log("ERROR", error); | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment