mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-09 00:39:07 +00:00
FEAT: change password
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
AuthDisableTotpMfaRequest,
|
||||
AuthDismissTotpMfaRequest,
|
||||
AuthVerifyTotpMfaRequest,
|
||||
AuthChangePasswordRequest,
|
||||
} from '@victorradael/protospack';
|
||||
|
||||
export class AuthClientService implements OnModuleInit {
|
||||
@@ -181,4 +182,28 @@ export class AuthClientService implements OnModuleInit {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async changePassword({
|
||||
accessToken,
|
||||
oldPassword,
|
||||
newPassword,
|
||||
}: AuthChangePasswordRequest): Promise<any> {
|
||||
console.log('AuthClientService', 'ChangePassword');
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.authService
|
||||
.changePassword({
|
||||
accessToken,
|
||||
oldPassword,
|
||||
newPassword,
|
||||
})
|
||||
.subscribe({
|
||||
next: resolve,
|
||||
error: (err) => reject(err.details),
|
||||
complete() {
|
||||
console.log('done');
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user