]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/+video-edit/video-update-routing.module.ts
Use a resolver when updating the video
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-update-routing.module.ts
1 import { NgModule } from '@angular/core'
2 import { RouterModule, Routes } from '@angular/router'
3
4 import { MetaGuard } from '@ngx-meta/core'
5
6 import { LoginGuard } from '../../core'
7 import { VideoUpdateComponent } from './video-update.component'
8 import { VideoUpdateResolver } from '@app/videos/+video-edit/video-update.resolver'
9
10 const videoUpdateRoutes: Routes = [
11 {
12 path: '',
13 component: VideoUpdateComponent,
14 canActivate: [ MetaGuard, LoginGuard ],
15 resolve: {
16 videoData: VideoUpdateResolver
17 }
18 }
19 ]
20
21 @NgModule({
22 imports: [ RouterModule.forChild(videoUpdateRoutes) ],
23 exports: [ RouterModule ]
24 })
25 export class VideoUpdateRoutingModule {}