diff options
Diffstat (limited to 'client/src/app/shared/video-blacklist/video-blacklist.service.ts')
-rw-r--r-- | client/src/app/shared/video-blacklist/video-blacklist.service.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/video-blacklist/video-blacklist.service.ts b/client/src/app/shared/video-blacklist/video-blacklist.service.ts index 040d82c9a..a014260b1 100644 --- a/client/src/app/shared/video-blacklist/video-blacklist.service.ts +++ b/client/src/app/shared/video-blacklist/video-blacklist.service.ts | |||
@@ -36,8 +36,10 @@ export class VideoBlacklistService { | |||
36 | ) | 36 | ) |
37 | } | 37 | } |
38 | 38 | ||
39 | blacklistVideo (videoId: number) { | 39 | blacklistVideo (videoId: number, reason?: string) { |
40 | return this.authHttp.post(VideoBlacklistService.BASE_VIDEOS_URL + videoId + '/blacklist', {}) | 40 | const body = reason ? { reason } : {} |
41 | |||
42 | return this.authHttp.post(VideoBlacklistService.BASE_VIDEOS_URL + videoId + '/blacklist', body) | ||
41 | .pipe( | 43 | .pipe( |
42 | map(this.restExtractor.extractDataBool), | 44 | map(this.restExtractor.extractDataBool), |
43 | catchError(res => this.restExtractor.handleError(res)) | 45 | catchError(res => this.restExtractor.handleError(res)) |