Fix order of .status().send()

This commit is contained in:
Simon Detheridge
2020-01-04 17:15:21 +00:00
parent fce275e1d4
commit 6a679023d3
2 changed files with 2 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ app.get('/status', function(req, res) {
res.send('filestore sharelatex up')
} else {
logger.log('app is not ok - shutting down')
res.send('server is being shut down').status(500)
res.status(500).send('server is being shut down')
}
})

View File

@@ -57,7 +57,7 @@ class ExceptionHandler {
// request a shutdown to prevent memory leaks
this.beginShutdown()
if (!res.headerSent) {
res.send('uncaught exception').status(500)
res.status(500).send('uncaught exception')
}
req = {
body: req.body,