Moved to Angular 16
Moved to FastAPI 0.100.0
Moved to pydantic 2.0
This commit is contained in:
2023-07-22 09:19:48 +05:30
parent 8b2d15b9e1
commit 09b762d154
161 changed files with 693 additions and 753 deletions

View File

@ -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;