mirror of
https://github.com/typicode/json-server.git
synced 2025-07-27 20:23:34 +08:00
clean
This commit is contained in:
@ -253,7 +253,6 @@ 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)
|
||||
|
@ -551,7 +551,7 @@ describe('Server', () => {
|
||||
})
|
||||
|
||||
describe('PUT /:resource/:id', () => {
|
||||
it.only('should respond with json and replace resource', (done) => {
|
||||
it('should respond with json and replace resource', (done) => {
|
||||
var post = {id: 1, booleanValue: true, integerValue: 1}
|
||||
request(server)
|
||||
.put('/posts/1')
|
||||
|
Reference in New Issue
Block a user