feat(xo-server/api): user.removeAuthProvider
This commit is contained in:
parent
2a42e0ff94
commit
e51351be8d
@ -32,7 +32,7 @@
|
||||
|
||||
<!--packages-start-->
|
||||
|
||||
- xo-server patch
|
||||
- xo-server minor
|
||||
- xo-server-auth-github minor
|
||||
- xo-server-auth-google minor
|
||||
- xo-web patch
|
||||
|
@ -112,3 +112,16 @@ changePassword.params = {
|
||||
oldPassword: { type: 'string' },
|
||||
newPassword: { type: 'string' },
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
export async function removeAuthProvider({ id, authProvider }) {
|
||||
await this.updateUser(id, { authProviders: { [authProvider]: null } })
|
||||
}
|
||||
|
||||
removeAuthProvider.permission = 'admin'
|
||||
|
||||
removeAuthProvider.params = {
|
||||
authProvider: { type: 'string' },
|
||||
id: { type: 'string' },
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user