Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Project.create({ /* */ }).then(function(project) {
- return User.create({ /* */ }).then(function(user) {
- return project.hasUser(user).then(function(result) {
- // result would be false
- return project.addUser(user).then(function() {
- return project.hasUser(user).then(function(result) {
- // result would be true
- })
- })
- })
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement