Chore:
Moved to Angular 16 Moved to FastAPI 0.100.0 Moved to pydantic 2.0
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AuthGuard implements CanActivate {
|
||||
constructor(private router: Router, private authService: AuthService, private toaster: ToasterService) {}
|
||||
export class AuthGuard {
|
||||
constructor(
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
private toaster: ToasterService,
|
||||
) {}
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
|
||||
const { user } = this.authService;
|
||||
|
||||
Reference in New Issue
Block a user