Skip to content

Instantly share code, notes, and snippets.

@wallacyyy
Last active July 13, 2016 02:58
Show Gist options
  • Save wallacyyy/ddb722d15310b1905c06d22b998c5e01 to your computer and use it in GitHub Desktop.
Save wallacyyy/ddb722d15310b1905c06d22b998c5e01 to your computer and use it in GitHub Desktop.
2016-07-11
const RSVP = require('./rsvp')
const ID = function () {
return Math.random().toString(36).substr(2, 9)
}
const invites = [
{
email: 'name@gmail.com',
name: 'Name',
confirmed: false,
url: ID()
},
{
email: 'anothername@gmail.com',
name: 'Another Name',
confirmed: false,
url: ID()
}
]
invites.forEach(function (invite) {
RSVP.create(invite).then(function (created) {
console.log(created)
}).catch(function (err) {
console.log(err)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment