diff options
Diffstat (limited to 'client/src/app/+video-studio')
4 files changed, 5 insertions, 24 deletions
diff --git a/client/src/app/+video-studio/edit/index.ts b/client/src/app/+video-studio/edit/index.ts index ff1d77fc0..15b57e1c8 100644 --- a/client/src/app/+video-studio/edit/index.ts +++ b/client/src/app/+video-studio/edit/index.ts | |||
@@ -1,2 +1 @@ | |||
1 | export * from './video-studio-edit.component' | export * from './video-studio-edit.component' | |
2 | export * from './video-studio-edit.resolver' | ||
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts b/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts deleted file mode 100644 index c658be50b..000000000 --- a/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | |||
2 | import { Injectable } from '@angular/core' | ||
3 | import { ActivatedRouteSnapshot, Resolve } from '@angular/router' | ||
4 | import { VideoService } from '@app/shared/shared-main' | ||
5 | |||
6 | @Injectable() | ||
7 | export class VideoStudioEditResolver implements Resolve<any> { | ||
8 | constructor ( | ||
9 | private videoService: VideoService | ||
10 | ) { | ||
11 | } | ||
12 | |||
13 | resolve (route: ActivatedRouteSnapshot) { | ||
14 | const videoId: string = route.params['videoId'] | ||
15 | |||
16 | return this.videoService.getVideo({ videoId }) | ||
17 | } | ||
18 | } | ||
diff --git a/client/src/app/+video-studio/video-studio-routing.module.ts b/client/src/app/+video-studio/video-studio-routing.module.ts index bcd9b79a5..4c08631a1 100644 --- a/client/src/app/+video-studio/video-studio-routing.module.ts +++ b/client/src/app/+video-studio/video-studio-routing.module.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { RouterModule, Routes } from '@angular/router' | 2 | import { RouterModule, Routes } from '@angular/router' |
3 | import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' | 3 | import { VideoResolver } from '@app/shared/shared-main' |
4 | import { VideoStudioEditComponent } from './edit' | ||
4 | 5 | ||
5 | const videoStudioRoutes: Routes = [ | 6 | const videoStudioRoutes: Routes = [ |
6 | { | 7 | { |
@@ -15,7 +16,7 @@ const videoStudioRoutes: Routes = [ | |||
15 | } | 16 | } |
16 | }, | 17 | }, |
17 | resolve: { | 18 | resolve: { |
18 | video: VideoStudioEditResolver | 19 | video: VideoResolver |
19 | } | 20 | } |
20 | } | 21 | } |
21 | ] | 22 | ] |
diff --git a/client/src/app/+video-studio/video-studio.module.ts b/client/src/app/+video-studio/video-studio.module.ts index 1a8763539..7c1dc02ea 100644 --- a/client/src/app/+video-studio/video-studio.module.ts +++ b/client/src/app/+video-studio/video-studio.module.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { NgModule } from '@angular/core' | 1 | import { NgModule } from '@angular/core' |
2 | import { SharedFormModule } from '@app/shared/shared-forms' | 2 | import { SharedFormModule } from '@app/shared/shared-forms' |
3 | import { SharedMainModule } from '@app/shared/shared-main' | 3 | import { SharedMainModule } from '@app/shared/shared-main' |
4 | import { VideoStudioEditComponent, VideoStudioEditResolver } from './edit' | 4 | import { VideoStudioEditComponent } from './edit' |
5 | import { VideoStudioService } from './shared' | 5 | import { VideoStudioService } from './shared' |
6 | import { VideoStudioRoutingModule } from './video-studio-routing.module' | 6 | import { VideoStudioRoutingModule } from './video-studio-routing.module' |
7 | 7 | ||
@@ -20,8 +20,7 @@ import { VideoStudioRoutingModule } from './video-studio-routing.module' | |||
20 | exports: [], | 20 | exports: [], |
21 | 21 | ||
22 | providers: [ | 22 | providers: [ |
23 | VideoStudioService, | 23 | VideoStudioService |
24 | VideoStudioEditResolver | ||
25 | ] | 24 | ] |
26 | }) | 25 | }) |
27 | export class VideoStudioModule { } | 26 | export class VideoStudioModule { } |