]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+video-studio/edit/video-studio-edit.resolver.ts
Support video views/viewers stats in server
[github/Chocobozzz/PeerTube.git] / client / src / app / +video-studio / edit / video-studio-edit.resolver.ts
CommitLineData
c729caf6
C
1
2import { Injectable } from '@angular/core'
3import { ActivatedRouteSnapshot, Resolve } from '@angular/router'
4import { VideoService } from '@app/shared/shared-main'
5
6@Injectable()
92e66e04 7export class VideoStudioEditResolver implements Resolve<any> {
c729caf6
C
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}