Created
February 21, 2018 19:28
-
-
Save astrotars/f4f10bf0e36ab4469f8a5629b1cda1ad 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
personalization({ | |
endpoint: '/user_recommendations', | |
userId: req.user.sub, // id is extracted from the jwt | |
}) | |
.then(users => { | |
// iterate over users and enrich | |
users.map(user => { | |
// do something with the user data | |
}); | |
}) | |
.catch(err => { | |
res.status(503).send(err.response.data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment