From 5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 May 2018 11:00:57 +0200 Subject: Fix typings --- client/src/app/shared/video/video.service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/video/video.service.ts') 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 { ) } - viewVideo (uuid: string): Observable { + viewVideo (uuid: string): Observable { return this.authHttp.post(this.getVideoViewUrl(uuid), {}) .pipe( map(this.restExtractor.extractDataBool), @@ -92,7 +92,7 @@ export class VideoService { const req = new HttpRequest('POST', VideoService.BASE_VIDEO_URL + 'upload', video, { reportProgress: true }) return this.authHttp - .request(req) + .request<{ video: { id: number, uuid: string} }>(req) .pipe(catchError(this.restExtractor.handleError)) } @@ -265,11 +265,10 @@ export class VideoService { return this.setVideoRate(id, 'none') } - getUserVideoRating (id: number): Observable { + getUserVideoRating (id: number) { const url = UserService.BASE_USERS_URL + 'me/videos/' + id + '/rating' - return this.authHttp - .get(url) + return this.authHttp.get(url) .pipe(catchError(res => this.restExtractor.handleError(res))) } -- cgit v1.2.3