Created
March 4, 2017 23:30
-
-
Save makefunstuff/2ef69ea45810c55d805345423a80df54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.param('entry_id', (req, res, next, entry_id) => { | |
getDataById(entry_id) | |
.then((data) => { | |
req.metadata = { | |
info: 'data is received', | |
event: 'data.received' | |
}; | |
req.result = data; | |
next(); | |
}) | |
.catch(next); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment