diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-13 16:57:13 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 09:27:18 +0200 |
commit | 26b7305a232e547709f433a6edf700bf495935d8 (patch) | |
tree | b5676090c61df72f864735bcc881d5ee256cffbd /client/src/app/shared/video-blacklist/video-blacklist.service.ts | |
parent | efc9e8450a8bbeeef9cd18e3ad6037abc0f815c3 (diff) | |
download | PeerTube-26b7305a232e547709f433a6edf700bf495935d8.tar.gz PeerTube-26b7305a232e547709f433a6edf700bf495935d8.tar.zst PeerTube-26b7305a232e547709f433a6edf700bf495935d8.zip |
Add blacklist reason field
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)) |