mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
show already selected members of the group chat
- filter list of available members to group chat
This commit is contained in:
@@ -22,9 +22,6 @@ export class LoginPage implements OnInit {
|
||||
password: string = environment.defaultuserpwd;
|
||||
userattempt: User;
|
||||
|
||||
public body = {"user": this.username,"password": this.password};
|
||||
public postData = {"user": this.username,"password": this.password};
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
@@ -56,11 +53,18 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
|
||||
loginRocketChat(){
|
||||
this.authService.loginChat(this.postData).subscribe((res: any) =>{
|
||||
|
||||
let postData = {
|
||||
"user": this.username,
|
||||
"password": this.password
|
||||
}
|
||||
this.authService.loginChat(postData).subscribe((res: any) =>{
|
||||
this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
console.log('Logged user \n'+res.data);
|
||||
console.log('Login to Rocket chat OK');
|
||||
},(error:any) =>{
|
||||
console.log('Network error');
|
||||
this.presentAlert('Network error '+error);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -78,6 +82,8 @@ export class LoginPage implements OnInit {
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)){
|
||||
console.log(this.userattempt);
|
||||
|
||||
this.loginRocketChat();
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user