fix: login error

This commit is contained in:
Gerzon Z 2022-03-08 11:38:46 -04:00
parent 5a4f02b048
commit 6015349ee1
1 changed files with 3 additions and 4 deletions

View File

@ -25,7 +25,6 @@ import { updatePermission } from '../../../actions/permissions';
import EventEmitter from '../../../utils/events';
import { updateSettings } from '../../../actions/settings';
import defaultSettings from '../../../constants/settings';
import getSettings from '../../methods/getSettings';
interface IServices {
[index: string]: string | boolean;
@ -87,7 +86,7 @@ function connect(
EventEmitter.emit('INQUIRY_UNSUBSCRIBE');
sdk.initialize(server);
getSettings();
this.getSettings();
sdk.current
.connect()
@ -333,7 +332,7 @@ function loginTOTP(params: ICredentials, loginEmailPassword?: boolean, isFromWeb
});
}
function loginWithPassword({ user, password }: { user: string; password: string }) {
function loginWithPassword({ user, password }: { user: string; password: string }): Promise<ILoggedUser> {
let params: ICredentials = { user, password };
const state = store.getState();
@ -433,7 +432,7 @@ async function getWebsocketInfo({ server }: { server: string }) {
}
}
sdk.current.disconnect();
sdk.disconnect();
return {
success: true