Last active
July 15, 2017 18:34
-
-
Save cpjk/20cbb79d0cba0e33c49f5ae6fdf76dfb 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
app.use(function(req, res, next) { | |
Choral.createNew({ | |
user: res.locals.userModel, | |
type: 'device', | |
name: 'asdf' | |
}, (err, choral) => { // HERE IS THE CALLBACK WE PASS | |
if (err) { | |
console.log(err); | |
return next(err); | |
} | |
// DO THINGS WITH YOUR NEW CHORAL | |
}); | |
return next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment