toggle_activation api is also deprecated
This commit is contained in:
parent
36376ce57c
commit
4e4c4af422
3 changed files with 37 additions and 13 deletions
|
@ -332,10 +332,9 @@ const users = {
|
|||
.then((relationship) => commit('updateUserRelationship', [relationship]))
|
||||
},
|
||||
toggleActivationStatus ({ rootState, commit }, user) {
|
||||
rootState.api.backendInteractor.toggleActivationStatus(user)
|
||||
.then(response => {
|
||||
commit('updateActivationStatus', { user, deactivated: response.deactivated })
|
||||
})
|
||||
const api = user.deactivated ? rootState.api.backendInteractor.activateUser : rootState.api.backendInteractor.deactivateUser
|
||||
api(user)
|
||||
.then(({ deactivated }) => commit('updateActivationStatus', { user, deactivated }))
|
||||
},
|
||||
registerPushNotifications (store) {
|
||||
const token = store.state.currentUser.credentials
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue