فهرست منبع

Fix order of .status().send()

Simon Detheridge 6 سال پیش
والد
کامیت
6a679023d3
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      services/filestore/app.js
  2. 1 1
      services/filestore/app/js/ExceptionHandler.js

+ 1 - 1
services/filestore/app.js

@@ -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')
   }
 })
 

+ 1 - 1
services/filestore/app/js/ExceptionHandler.js

@@ -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,