diff options
Diffstat (limited to 'client/src/app/shared/video-playlist/video-playlist.service.ts')
-rw-r--r-- | client/src/app/shared/video-playlist/video-playlist.service.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/shared/video-playlist/video-playlist.service.ts b/client/src/app/shared/video-playlist/video-playlist.service.ts index 376387082..42791af86 100644 --- a/client/src/app/shared/video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/video-playlist/video-playlist.service.ts | |||
@@ -113,11 +113,10 @@ export class VideoPlaylistService { | |||
113 | } | 113 | } |
114 | 114 | ||
115 | addVideoInPlaylist (playlistId: number, body: VideoPlaylistElementCreate) { | 115 | addVideoInPlaylist (playlistId: number, body: VideoPlaylistElementCreate) { |
116 | return this.authHttp.post(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + playlistId + '/videos', body) | 116 | const url = VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + playlistId + '/videos' |
117 | .pipe( | 117 | |
118 | map(this.restExtractor.extractDataBool), | 118 | return this.authHttp.post<{ videoPlaylistElement: { id: number } }>(url, body) |
119 | catchError(err => this.restExtractor.handleError(err)) | 119 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
120 | ) | ||
121 | } | 120 | } |
122 | 121 | ||
123 | updateVideoOfPlaylist (playlistId: number, playlistElementId: number, body: VideoPlaylistElementUpdate) { | 122 | updateVideoOfPlaylist (playlistId: number, playlistElementId: number, body: VideoPlaylistElementUpdate) { |