<commit_before>import { Injectable } from "@angular/core";
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router";
import { Observable } from "rxjs/Rx";
import { TokenService } from "../services/auth/token.service";

@Injectable()
export class AuthGuard implements CanActivate {
    constructor(protected router:Router, protected tokenService:TokenService) {
    }

    canActivate(route:ActivatedRouteSnapshot, state:RouterStateSnapshot):Observable<boolean> | boolean {
        // if (!this.tokenService.isTokenExpired()) {
            return true;
        // }
        //
        // this.router.navigateByUrl('/login');
        // return false;
    }
}<commit_msg>rollback<commit_after>import { Injectable } from "@angular/core";
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router";
import { Observable } from "rxjs/Rx";
import { TokenService } from "../services/auth/token.service";

@Injectable()
export class AuthGuard implements CanActivate {
    constructor(protected router: Router, protected tokenService: TokenService) {
    }

    canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean {
        if (!this.tokenService.isTokenExpired()) {
            return true;
        }
        
        this.router.navigateByUrl('/login');
        return false;
    }
}
{'fraction_non_alphanumeric': 0.11948790896159317, 'fraction_numerical': 0.0, 'mean_word_length': 3.69, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '356797', 'n_tokens_mistral': 380, 'n_tokens_neox': 378, 'n_words': 83}