<commit_before>import { CanActivate } from '@angular/router';
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import { Router } from '@angular/router';

@Injectable()
export class AuthGuard implements CanActivate {

    private can: boolean = false;

    constructor(public afAuth: AngularFireAuth, private router: Router) {
    }
    
    canActivate() {
        return this.afAuth.authState.map(data => {
            let fakka = !!data;

            if (fakka) {
                //this.router.navigate(['/boards'])
            }
            return fakka;

        });<commit_msg>login redirect<commit_after>import { CanActivate } from '@angular/router';
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import { Router } from '@angular/router';

@Injectable()
export class AuthGuard implements CanActivate {

    private can: boolean = false;

    constructor(public afAuth: AngularFireAuth, private router: Router) {
    }
    
    canActivate() {
        return this.afAuth.authState.map(data => {
            let fakka = !!data;

            if (!fakka) {
                this.router.navigate(['/'])
            }
            return fakka;

        });
{'fraction_non_alphanumeric': 0.12200956937799043, 'fraction_numerical': 0.001594896331738437, 'mean_word_length': 2.505586592178771, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5071940', 'n_tokens_mistral': 368, 'n_tokens_neox': 355, 'n_words': 87}