Last active
December 30, 2017 17:10
-
-
Save wharley/f190911af37735b1cfc401fe2be4b703 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
Resource.after('get', (req, res, next) => { | |
const tmp = res.locals.bundle.title // Permita trocar os campos do título e do ano | |
res.locals.bundle.title = res.locals.bundle.year | |
res.locals.bundle.year = tmp | |
next() // Não se esqueça de ligar para a próxima! | |
}) | |
Resource.after('recommend', do_something) // Executa após todos os verbos HTTP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment