aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+video-editor/edit/video-editor-edit.resolver.ts
blob: 7b95ae834ef4c7e2791de2dc28e710f0789f5cb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
import { VideoService } from '@app/shared/shared-main'

@Injectable()
export class VideoEditorEditResolver implements Resolve<any> {
  constructor (
    private videoService: VideoService
  ) {
  }

  resolve (route: ActivatedRouteSnapshot) {
    const videoId: string = route.params['videoId']

    return this.videoService.getVideo({ videoId })
  }
}