mirror of
https://github.com/typicode/json-server.git
synced 2025-07-28 04:32:24 +08:00
Fix POST status code, thanks to @lagoLast
This commit is contained in:
@ -156,7 +156,7 @@ module.exports = function(source) {
|
||||
var resource = db(req.params.resource)
|
||||
.insert(req.body)
|
||||
|
||||
res.jsonp(resource)
|
||||
res.status(201).jsonp(resource)
|
||||
}
|
||||
|
||||
// PUT /:resource/:id
|
||||
|
Reference in New Issue
Block a user