Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Commit

Permalink
Avoid sending useless data in response
Browse files Browse the repository at this point in the history
  • Loading branch information
François Triquet committed Oct 19, 2017
1 parent c0b21cd commit f632e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.js
Expand Up @@ -28,7 +28,7 @@ app.use('/', (request, response) => {
bot.reply(request, response)
.then(success => {
console.log(success)
if (!response.headersSent) { response.status(200).json(success) }
if (!response.headersSent) { response.status(200) }
}).catch(error => {
console.log('Error in your bot:', error)
if (!response.headersSent) { response.sendStatus(400) }
Expand Down

0 comments on commit f632e14

Please sign in to comment.