fix callback for setUserIdAndEmail
This commit is contained in:
parent
cee9face7f
commit
6d89cc91f7
|
@ -52,7 +52,7 @@ class AuthService {
|
||||||
await this.tokenService.setTokens(response.accessToken, response.refreshToken);
|
await this.tokenService.setTokens(response.accessToken, response.refreshToken);
|
||||||
await this.cryptoService.setKey(key);
|
await this.cryptoService.setKey(key);
|
||||||
await this.cryptoService.setKeyHash(hashedPassword);
|
await this.cryptoService.setKeyHash(hashedPassword);
|
||||||
await this.setUserIdAndEmail(this.tokenService.getUserId(), this.tokenService.getEmail());
|
await this.userService.setUserIdAndEmail(this.tokenService.getUserId(), this.tokenService.getEmail());
|
||||||
await this.cryptoService.setEncKey(response.key);
|
await this.cryptoService.setEncKey(response.key);
|
||||||
await this.cryptoService.setEncPrivateKey(response.privateKey);
|
await this.cryptoService.setEncPrivateKey(response.privateKey);
|
||||||
|
|
||||||
|
@ -63,12 +63,6 @@ class AuthService {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
setUserIdAndEmail(userId: any, email: any) {
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
return this.userService.setUserIdAndEmail(userId, email, resolve);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
logOut(callback: Function) {
|
logOut(callback: Function) {
|
||||||
this.$rootScope.vaultCiphers = null;
|
this.$rootScope.vaultCiphers = null;
|
||||||
this.$rootScope.vaultFolders = null;
|
this.$rootScope.vaultFolders = null;
|
||||||
|
|
|
@ -15,7 +15,6 @@ export default class UserService {
|
||||||
constructor(private tokenService: TokenService) {
|
constructor(private tokenService: TokenService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: fix callbacks
|
|
||||||
setUserIdAndEmail(userId: string, email: string): Promise<any> {
|
setUserIdAndEmail(userId: string, email: string): Promise<any> {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|
Loading…
Reference in New Issue