]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/video/video.resolver.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / video / video.resolver.ts
CommitLineData
c729caf6 1import { Injectable } from '@angular/core'
52798aa5 2import { ActivatedRouteSnapshot } from '@angular/router'
384ba8b7 3import { VideoService } from './video.service'
c729caf6
C
4
5@Injectable()
52798aa5 6export class VideoResolver {
c729caf6
C
7 constructor (
8 private videoService: VideoService
9 ) {
10 }
11
12 resolve (route: ActivatedRouteSnapshot) {
13 const videoId: string = route.params['videoId']
14
15 return this.videoService.getVideo({ videoId })
16 }
17}