We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be0c95d commit bf7413aCopy full SHA for bf7413a
CRUD API's/app/controllers/controller.js
@@ -20,7 +20,7 @@ exports.create=function(req,res){
20
if(note)return res.status(400).json({message: "same title exists"});
21
22
newnote.save()
23
- .then(data=> {res.status(200).send(data)})
+ .then(data=> {res.status(201).send(data)})
24
.catch(err=>{
25
res.status(404).json({"message" : "Some error occurred while creating the Note"});
26
});
@@ -128,4 +128,4 @@ exports.delete=function(req,res){
128
message: "Could not delete note with id " + req.params.noteId
129
130
131
-};
+};
0 commit comments