Skip to content

Commit

Permalink
Adiciona nome correto a função
Browse files Browse the repository at this point in the history
Signed-off-by: DaviMarinho <[email protected]>
  • Loading branch information
DaviMarinho committed Nov 16, 2023
1 parent 86a2608 commit 9535a96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import { AuthGuard } from './guard/auth.guard';
import { EditUserComponent } from './pages/edit-user/edit-user.component';
import { SuggestAgendaComponent } from './pages/suggest-agenda/suggest-agenda.component';
import { ParticipateComponent } from './pages/participate/participate.component';
import { NoTokenGuard } from './guard/no-token.guard';
import { WithTokenGuard } from './guard/with-token.guard';

const routes: Routes = [
{ path: 'login', component: LoginComponent, canActivate: [NoTokenGuard], },
{ path: 'register', component: RegisterComponent, canActivate: [NoTokenGuard], },
{ path: 'loginsocial', component: LoginSocialComponent, canActivate: [NoTokenGuard], },
{ path: 'sendCodeResetPassword', component: CheckCodeRestPasswordComponent, canActivate: [NoTokenGuard], },
{ path: 'changePassword', component: ResetPasswordComponent, canActivate: [NoTokenGuard], },
{ path: 'login', component: LoginComponent, canActivate: [WithTokenGuard], },
{ path: 'register', component: RegisterComponent, canActivate: [WithTokenGuard], },
{ path: 'loginsocial', component: LoginSocialComponent, canActivate: [WithTokenGuard], },
{ path: 'sendCodeResetPassword', component: CheckCodeRestPasswordComponent, canActivate: [WithTokenGuard], },
{ path: 'changePassword', component: ResetPasswordComponent, canActivate: [WithTokenGuard], },
{ path: 'videos', component: VideoComponent },
{ path: 'video/:idVideo', component: VideoViewerComponent },
{ path: 'activeAccount', component: ActiveAccountComponent },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TestBed } from '@angular/core/testing';

import { NoTokenGuard } from './no-token.guard';
import { WithTokenGuard } from './with-token.guard';

describe('NoTokenGuard', () => {
let guard: NoTokenGuard;
describe('WithTokenGuard', () => {
let guard: WithTokenGuard;

beforeEach(() => {
TestBed.configureTestingModule({});
guard = TestBed.inject(NoTokenGuard);
guard = TestBed.inject(WithTokenGuard);
});

it('should be created', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AuthService } from '../services/auth.service';
@Injectable({
providedIn: 'root'
})
export class NoTokenGuard implements CanActivate {
export class WithTokenGuard implements CanActivate {
constructor(private authService: AuthService, private router: Router) {}

canActivate(): boolean {
Expand Down

0 comments on commit 9535a96

Please sign in to comment.