Skip to content

Commit

Permalink
modify mock method in users delete, fix zuiidea#859
Browse files Browse the repository at this point in the history
  • Loading branch information
superlbr committed Jul 20, 2018
1 parent d6d94e2 commit 9eff4ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mock/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ module.exports = {
})
},

[`DELETE ${apiPrefix}/users`] (req, res) {
[`POST ${apiPrefix}/users/delete`] (req, res) {
const { ids } = req.body
database = database.filter(item => !ids.some(_ => _ === item.id))
res.status(204).end()
Expand Down
4 changes: 2 additions & 2 deletions src/pages/user/services/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function query (params) {

export function remove (params) {
return request({
url: users,
method: 'delete',
url: users + '/delete',
method: 'post',
data: params,
})
}

0 comments on commit 9eff4ca

Please sign in to comment.