mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove comments
This commit is contained in:
@@ -114,6 +114,8 @@ export class AuthService {
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
console.log('login', SessionStore.user.RochetChatUser, SessionStore.user.Password)
|
||||
|
||||
this.WsChatService.connect();
|
||||
this.WsChatService.login().then((message) => {
|
||||
console.log('rocket chat login successfully', message)
|
||||
@@ -123,24 +125,24 @@ export class AuthService {
|
||||
})
|
||||
}, 1)
|
||||
|
||||
// let responseChat = await this.httpService.post('login', postData).toPromise();
|
||||
let responseChat = await this.httpService.post('login', postData).toPromise();
|
||||
|
||||
// if(responseChat) {
|
||||
// console.log('Login to Rocket chat OK');
|
||||
// this.ValidatedUserChat = responseChat;
|
||||
// localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
// localStorage.setItem('Meteor.loginToken', responseChat['data'].authToken);
|
||||
// localStorage.setItem('Meteor.userId',responseChat['data'].userId);
|
||||
// this.cookieService.set('rc_token', responseChat['data'].authToken);
|
||||
// this.cookieService.set('rc_uid', responseChat['data'].userId);
|
||||
// this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
// return true;
|
||||
// }
|
||||
// else{
|
||||
// console.log('Network error');
|
||||
// this.presentAlert('Network error');
|
||||
// return false;
|
||||
// }
|
||||
if(responseChat) {
|
||||
console.log('Login to Rocket chat OK');
|
||||
this.ValidatedUserChat = responseChat;
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
localStorage.setItem('Meteor.loginToken', responseChat['data'].authToken);
|
||||
localStorage.setItem('Meteor.userId',responseChat['data'].userId);
|
||||
this.cookieService.set('rc_token', responseChat['data'].authToken);
|
||||
this.cookieService.set('rc_uid', responseChat['data'].userId);
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
console.log('Network error');
|
||||
this.presentAlert('Network error');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//Get user data from RocketChat | global object
|
||||
|
||||
Reference in New Issue
Block a user