This commit is contained in:
Peter Maquiran
2021-07-29 17:02:16 +01:00
parent 87e84c3bfe
commit 9138f9903c
6 changed files with 141 additions and 3 deletions
+6 -1
View File
@@ -10,6 +10,7 @@ import { AuthConnstants } from '../config/auth-constants';
import { AlertController } from '@ionic/angular';
import { LocalstoreService } from '../store/localstore.service';
import { ToastService } from './toast.service';
import { UserStore } from 'src/app/store/user.service'
@Injectable({
providedIn: 'root'
@@ -18,9 +19,10 @@ export class AuthService {
userData$ = new BehaviorSubject<any>('');
userId$ = new BehaviorSubject<any>('');
headers: HttpHeaders;
public ValidatedUser:User;
public ValidatedUser: User;
public ValidatedUserChat:any;
opts:any;
userStore = UserStore
constructor(
private http: HttpClient,
@@ -74,7 +76,10 @@ export class AuthService {
response.BasicAuthKey = user.BasicAuthKey
this.ValidatedUser = response;
console.log('response', response)
this.localstoreService.set('user', response)
this.userStore.reset(response)
this.storageService.store(AuthConnstants.USER, response);