aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/+video-studio/edit/video-studio-edit.resolver.ts
blob: c658be50b49cf9c1861b4e3ce2809797e4551787 (plain) (tree)
1
2
3
4
5
6
7





                                                                 
                                                              










                                                   
import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
import { VideoService } from '@app/shared/shared-main'

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

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

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