mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update groups api routes
This commit is contained in:
parent
06eb2165ea
commit
9657fc410e
1 changed files with 1 additions and 3 deletions
|
@ -227,11 +227,9 @@ export default {
|
|||
},
|
||||
|
||||
onUserChanged ({ item, index, name, action }) {
|
||||
const uri = 'users/groups/' + name
|
||||
const data = { [action]: item }
|
||||
const from = action === 'add' ? 'availableMembers' : 'members'
|
||||
const to = action === 'add' ? 'members' : 'availableMembers'
|
||||
api.put(uri, data).then(() => {
|
||||
api.put(`users/groups/${name}/${action}/${item}`).then(() => {
|
||||
this.normalGroups[name][from].splice(index, 1)
|
||||
this.normalGroups[name][to].push(item)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue