aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-16 11:00:57 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 11:06:33 +0200
commit5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d (patch)
tree5d3623fc06281065b12ab9687fead7194b62cb3f /client/src/app/shared/video/video.service.ts
parent133592034881926dc2da63735fe7344bfedd9c31 (diff)
downloadPeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.gz
PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.zst
PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.zip
Fix typings
Diffstat (limited to 'client/src/app/shared/video/video.service.ts')
-rw-r--r--client/src/app/shared/video/video.service.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index f57cb6d6d..5b8e2467a 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -48,7 +48,7 @@ export class VideoService {
48 ) 48 )
49 } 49 }
50 50
51 viewVideo (uuid: string): Observable<VideoDetails> { 51 viewVideo (uuid: string): Observable<boolean> {
52 return this.authHttp.post(this.getVideoViewUrl(uuid), {}) 52 return this.authHttp.post(this.getVideoViewUrl(uuid), {})
53 .pipe( 53 .pipe(
54 map(this.restExtractor.extractDataBool), 54 map(this.restExtractor.extractDataBool),
@@ -92,7 +92,7 @@ export class VideoService {
92 const req = new HttpRequest('POST', VideoService.BASE_VIDEO_URL + 'upload', video, { reportProgress: true }) 92 const req = new HttpRequest('POST', VideoService.BASE_VIDEO_URL + 'upload', video, { reportProgress: true })
93 93
94 return this.authHttp 94 return this.authHttp
95 .request(req) 95 .request<{ video: { id: number, uuid: string} }>(req)
96 .pipe(catchError(this.restExtractor.handleError)) 96 .pipe(catchError(this.restExtractor.handleError))
97 } 97 }
98 98
@@ -265,11 +265,10 @@ export class VideoService {
265 return this.setVideoRate(id, 'none') 265 return this.setVideoRate(id, 'none')
266 } 266 }
267 267
268 getUserVideoRating (id: number): Observable<UserVideoRate> { 268 getUserVideoRating (id: number) {
269 const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating' 269 const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating'
270 270
271 return this.authHttp 271 return this.authHttp.get<UserVideoRate>(url)
272 .get(url)
273 .pipe(catchError(res => this.restExtractor.handleError(res))) 272 .pipe(catchError(res => this.restExtractor.handleError(res)))
274 } 273 }
275 274