Last active
August 29, 2015 14:13
-
-
Save matmar10/a132b5b4cbed342124c9 to your computer and use it in GitHub Desktop.
Express middleware the easy way with Passport
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
var sendEmailMiddleware = require('./middleware/send-email'); | |
app.post('/user/:id', | |
passport.authenticate('bearer'), | |
lookupUser, | |
validatePostBody, | |
mergeUser, | |
saveUser, | |
sendEmailMiddleware('user-updated'), | |
returnSuccess); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment