Improve filter callback

This commit is contained in:
Peter Maquiran
2022-01-10 22:04:04 +01:00
parent 053c6034a7
commit d04a57b35c
6 changed files with 120 additions and 123 deletions
+7 -5
View File
@@ -30,23 +30,23 @@ export class AuthService {
public alertController: AlertController,
private aesencrypt: AESEncrypt,
private cookieService: CookieService,
private RocketChatClientService: RocketChatClientService
) {
private RocketChatClientService: RocketChatClientService) {
this.headers = new HttpHeaders();
if (SessionStore.exist) {
this.ValidatedUser = SessionStore.user
console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
this.RocketChatClientService.connect(()=>{
this.RocketChatClientService.login({
username: SessionStore.user.UserName,
username: SessionStore.user.RochetChatUser,
password: SessionStore.user.Password
}).then((message) => {
console.log('rocket chat login successfully', message)
}).catch((message)=>{
console.log('rocket chat login failed', message)
})
})
})
}
@@ -91,6 +91,7 @@ export class AuthService {
}
session.Password = user.password
session.RochetChatUser = user.username.split('@')[0]
session.BasicAuthKey = user.BasicAuthKey
@@ -117,9 +118,10 @@ export class AuthService {
this.RocketChatClientService.connect(()=>{
this.RocketChatClientService.login({
username: user.username,
username: SessionStore.user.RochetChatUser,
password: user.password
}).then((message) => {
alert('sucess')
console.log('rocket chat login successfully', message)
}).catch((message)=>{
console.log('rocket chat login failed', message)