Last active
December 30, 2020 11:09
-
-
Save jaydenlin/0723a3606fd6324cb34d87df5ebabc0a 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.post(`/api/:userId/posts`, async (req, res) => { | |
const token = await tokenService.getToken(req); | |
const response = await api.post(`http://internal.corp.com/${req.params.userId}/posts?message=${req.query.message}&token=${token}`); | |
return res.send(response.data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment