Browse Source

change DELETE return code

pull/1/head
Nicolas Massé 6 years ago
parent
commit
5c3affe53a
  1. 2
      api-backend/nodejs/server.js

2
api-backend/nodejs/server.js

@ -63,7 +63,7 @@ router.post("/pets",function(req,res){
router.delete("/pets/:id",function(req,res){ router.delete("/pets/:id",function(req,res){
var id = req.params.id; var id = req.params.id;
if (! (id in pets)) { if (! (id in pets)) {
return error(res, 404, util.format("No such pet with id '%s' !", id)); return error(res, 200, util.format("No such pet with id '%s' !", id));
} }
var pet = pets[id]; var pet = pets[id];

Loading…
Cancel
Save