Skip to content

Commit bf7413a

Browse files
authored
Update controller.js
1 parent be0c95d commit bf7413a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CRUD API's/app/controllers/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports.create=function(req,res){
2020
if(note)return res.status(400).json({message: "same title exists"});
2121

2222
newnote.save()
23-
.then(data=> {res.status(200).send(data)})
23+
.then(data=> {res.status(201).send(data)})
2424
.catch(err=>{
2525
res.status(404).json({"message" : "Some error occurred while creating the Note"});
2626
});
@@ -128,4 +128,4 @@ exports.delete=function(req,res){
128128
message: "Could not delete note with id " + req.params.noteId
129129
});
130130
});
131-
};
131+
};

0 commit comments

Comments
 (0)