Procházet zdrojové kódy

remove ok and status

mizozobu před 6 roky
rodič
revize
70f6b3aef0
1 změnil soubory, kde provedl 1 přidání a 6 odebrání
  1. 1 6
      src/server/crowi/express-init.js

+ 1 - 6
src/server/crowi/express-init.js

@@ -159,10 +159,7 @@ module.exports = function(crowi, app) {
       throw new Error('invalid value supplied to res.apiv3');
       throw new Error('invalid value supplied to res.apiv3');
     }
     }
 
 
-    this.json({
-      oK: true,
-      data: obj,
-    });
+    this.json({ data: obj });
   };
   };
 
 
   express.response.apiv3Err = function(errs, status = 400) { // not arrow function
   express.response.apiv3Err = function(errs, status = 400) { // not arrow function
@@ -195,8 +192,6 @@ module.exports = function(crowi, app) {
     });
     });
 
 
     this.status(status).json({
     this.status(status).json({
-      oK: false,
-      status,
       errors: toArrayIfNot(errors),
       errors: toArrayIfNot(errors),
     });
     });
   };
   };