aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/routing/trending-guard.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/routing/trending-guard.service.ts')
-rw-r--r--client/src/app/core/routing/trending-guard.service.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/client/src/app/core/routing/trending-guard.service.ts b/client/src/app/core/routing/trending-guard.service.ts
new file mode 100644
index 000000000..7db7fe994
--- /dev/null
+++ b/client/src/app/core/routing/trending-guard.service.ts
@@ -0,0 +1,14 @@
1import { Injectable } from '@angular/core'
2import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router'
3import { RedirectService } from './redirect.service'
4
5@Injectable()
6export class TrendingGuard implements CanActivate {
7
8 constructor (private redirectService: RedirectService) {}
9
10 canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
11 this.redirectService.redirectToTrending()
12 return false
13 }
14}