mirror of
https://github.com/typicode/json-server.git
synced 2025-07-31 14:12:38 +08:00
Add stricter tests
This commit is contained in:
@ -253,6 +253,7 @@ module.exports = (db, name) => {
|
||||
function update (req, res, next) {
|
||||
const id = req.params.id
|
||||
let chain = db.get(name)
|
||||
console.log(req.body)
|
||||
|
||||
chain = req.method === 'PATCH'
|
||||
? chain.updateById(id, req.body)
|
||||
|
Reference in New Issue
Block a user