mirror of
https://github.com/koel/koel
synced 2024-11-24 13:13:05 +00:00
fix: remove invitation after revocation
This commit is contained in:
parent
55e11daf49
commit
39931bf2ae
2 changed files with 10 additions and 3 deletions
|
@ -13,5 +13,8 @@ export const invitationService = {
|
|||
users.forEach(user => userStore.add(user))
|
||||
},
|
||||
|
||||
revoke: async (user: User) => await http.delete(`invitations`, { email: user.email })
|
||||
revoke: async (user: User) => {
|
||||
await http.delete(`invitations`, { email: user.email })
|
||||
userStore.remove(user)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,8 +85,7 @@ export const userStore = {
|
|||
|
||||
async destroy (user: User) {
|
||||
await http.delete(`users/${user.id}`)
|
||||
this.state.users = differenceBy(this.state.users, [user], 'id')
|
||||
this.vault.delete(user.id)
|
||||
this.remove(user)
|
||||
|
||||
// Mama, just killed a man
|
||||
// Put a gun against his head
|
||||
|
@ -106,5 +105,10 @@ export const userStore = {
|
|||
// Mama, oooh
|
||||
// I don't want to die
|
||||
// I sometimes wish I'd never been born at all
|
||||
},
|
||||
|
||||
remove (user: User) {
|
||||
this.state.users = differenceBy(this.state.users, [user], 'id')
|
||||
this.vault.delete(user.id)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue