diff options
Diffstat (limited to 'client/src/app/menu/menu.component.ts')
-rw-r--r-- | client/src/app/menu/menu.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 69216e215..c0aea89b3 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { UserRight } from '../../../../shared/models/users/user-right.enum' | 3 | import { UserRight } from '../../../../shared/models/users/user-right.enum' |
4 | import { AuthService, AuthStatus, ServerService } from '../core' | 4 | import { AuthService, AuthStatus, RedirectService, ServerService } from '../core' |
5 | import { User } from '../shared/users/user.model' | 5 | import { User } from '../shared/users/user.model' |
6 | 6 | ||
7 | @Component({ | 7 | @Component({ |
@@ -24,7 +24,7 @@ export class MenuComponent implements OnInit { | |||
24 | constructor ( | 24 | constructor ( |
25 | private authService: AuthService, | 25 | private authService: AuthService, |
26 | private serverService: ServerService, | 26 | private serverService: ServerService, |
27 | private router: Router | 27 | private redirectService: RedirectService |
28 | ) {} | 28 | ) {} |
29 | 29 | ||
30 | ngOnInit () { | 30 | ngOnInit () { |
@@ -87,7 +87,7 @@ export class MenuComponent implements OnInit { | |||
87 | 87 | ||
88 | this.authService.logout() | 88 | this.authService.logout() |
89 | // Redirect to home page | 89 | // Redirect to home page |
90 | this.router.navigate(['/videos/list']) | 90 | this.redirectService.redirectToHomepage() |
91 | } | 91 | } |
92 | 92 | ||
93 | private computeIsUserHasAdminAccess () { | 93 | private computeIsUserHasAdminAccess () { |