mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
improvements
This commit is contained in:
@@ -47,37 +47,28 @@ export class AuthService {
|
||||
|
||||
//Login to rocketChat server
|
||||
loginChat(postData: any):Observable<any> {
|
||||
const res = this.httpService.post('login', postData);
|
||||
const res2 = res.subscribe(res=>{
|
||||
this.storageService.store(res);
|
||||
});
|
||||
return res;
|
||||
return this.httpService.post('login', postData);
|
||||
}
|
||||
|
||||
//Get user data from RocketChat
|
||||
//Get user data from RocketChat | global object
|
||||
getUserData(){
|
||||
const res = this.storageService.get('user');
|
||||
console.log(res);
|
||||
|
||||
|
||||
/* this.storageService.get(AuthConnstants.AUTH).then(res=>{
|
||||
this.storageService.get(AuthConnstants.AUTH).then(res=>{
|
||||
this.userData$.next(res);
|
||||
}) */
|
||||
});
|
||||
}
|
||||
|
||||
/* getProfile(){
|
||||
getProfile(){
|
||||
this.storageService.get(AuthConnstants.PROFILE).then(res=>{
|
||||
return res;
|
||||
});
|
||||
} */
|
||||
}
|
||||
|
||||
logoutChat(){
|
||||
//this.storageService.clear();
|
||||
/* this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
|
||||
this.storageService.removeStorageItem(AuthConnstants.AUTH).then(res =>{
|
||||
this.userData$.next('');
|
||||
this.router.navigate(['']);
|
||||
}) */
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user