Enhance auth-guard service for new API
This commit is contained in:
parent
a0291fb05e
commit
040fc22e69
1 changed files with 1 additions and 3 deletions
|
@ -3,12 +3,10 @@ import { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot } from
|
||||||
import {HttpClient, HttpParams} from '@angular/common/http';
|
import {HttpClient, HttpParams} from '@angular/common/http';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './user.service';
|
||||||
import { Subscription, Observable } from 'rxjs';
|
import { Subscription, Observable } from 'rxjs';
|
||||||
import { Owner } from './owner.model';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
||||||
export class AuthGuardService implements CanActivate {
|
export class AuthGuardService implements CanActivate {
|
||||||
private UserSub: Subscription = new Subscription();
|
|
||||||
private addr = '';
|
private addr = '';
|
||||||
private paid = false;
|
private paid = false;
|
||||||
private paidUpdate: Observable<boolean>;
|
private paidUpdate: Observable<boolean>;
|
||||||
|
@ -32,7 +30,7 @@ export class AuthGuardService implements CanActivate {
|
||||||
this.userService.uZaddrUpdate.
|
this.userService.uZaddrUpdate.
|
||||||
subscribe((addr) => {
|
subscribe((addr) => {
|
||||||
if (addr != null) {
|
if (addr != null) {
|
||||||
console.log(addr);
|
//console.log(addr);
|
||||||
this.addr = addr;
|
this.addr = addr;
|
||||||
} else {
|
} else {
|
||||||
console.log("No record for that token");
|
console.log("No record for that token");
|
||||||
|
|
Loading…
Reference in a new issue