Created
October 10, 2017 14:29
-
-
Save matthieu-D/56492b4a524b907ed6e2197831a401a5 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('/visa', function (req, res) { | |
var params = req.body.result.parameters; | |
res.setHeader('Content-Type', 'application/json'); | |
var deliveryTime = calculateDeliveryTime(); | |
response = `Your Visa for ${params.geoCountry} will be ready in ${deliveryTime}`; | |
res.send(JSON.stringify({ "speech": response, "displayText": response})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment