]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove unnecessary function
authorChocobozzz <me@florianbigard.com>
Tue, 18 Jan 2022 10:37:29 +0000 (11:37 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 18 Jan 2022 10:37:29 +0000 (11:37 +0100)
15 files changed:
client/src/app/core/rest/rest-extractor.service.ts
client/src/app/core/users/user.service.ts
client/src/app/shared/shared-instance/instance-follow.service.ts
client/src/app/shared/shared-main/custom-page/custom-page.service.ts
client/src/app/shared/shared-main/users/user-history.service.ts
client/src/app/shared/shared-main/users/user-notification.service.ts
client/src/app/shared/shared-main/video-caption/video-caption.service.ts
client/src/app/shared/shared-main/video-channel/video-channel.service.ts
client/src/app/shared/shared-main/video/redundancy.service.ts
client/src/app/shared/shared-main/video/video-ownership.service.ts
client/src/app/shared/shared-main/video/video.service.ts
client/src/app/shared/shared-moderation/abuse.service.ts
client/src/app/shared/shared-user-subscription/user-subscription.service.ts
client/src/app/shared/shared-video-comment/video-comment.service.ts
client/src/app/shared/shared-video-playlist/video-playlist.service.ts

index dd4a78de5ef1aea3cb27a2b969b27668a5aecad5..17053811c5000633a88f9358396d22996311cbe2 100644 (file)
@@ -9,10 +9,6 @@ export class RestExtractor {
 
   constructor (private router: Router) { }
 
-  extractDataBool () {
-    return true
-  }
-
   applyToResultListData <T, A, U> (
     result: ResultList<T>,
     fun: (data: T, ...args: A[]) => U,
index a6a0474aba0e2ebd854cdd355a3128be6d9f67aa..f173c356a8ab2ba8c5f89f9e15d97c5cec085ae6 100644 (file)
@@ -49,10 +49,7 @@ export class UserService {
     }
 
     return this.authHttp.put(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   changeEmail (password: string, newEmail: string) {
@@ -63,10 +60,7 @@ export class UserService {
     }
 
     return this.authHttp.put(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   // ---------------------------------------------------------------------------
@@ -90,20 +84,14 @@ export class UserService {
     const url = UserService.BASE_USERS_URL + 'me'
 
     return this.authHttp.put(url, profile)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   deleteMe () {
     const url = UserService.BASE_USERS_URL + 'me'
 
     return this.authHttp.delete(url)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   changeAvatar (avatarForm: FormData) {
@@ -117,16 +105,12 @@ export class UserService {
     const url = UserService.BASE_USERS_URL + 'me/avatar'
 
     return this.authHttp.delete(url)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   signup (userCreate: UserRegister) {
     return this.authHttp.post(UserService.BASE_USERS_URL + 'register', userCreate)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => this.signupInThisSession = true),
                  catchError(err => this.restExtractor.handleError(err))
                )
@@ -143,10 +127,7 @@ export class UserService {
     const url = UserService.BASE_USERS_URL + '/ask-reset-password'
 
     return this.authHttp.post(url, { email })
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   resetPassword (userId: number, verificationString: string, password: string) {
@@ -157,10 +138,7 @@ export class UserService {
     }
 
     return this.authHttp.post(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   verifyEmail (userId: number, verificationString: string, isPendingEmail: boolean) {
@@ -171,20 +149,14 @@ export class UserService {
     }
 
     return this.authHttp.post(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   askSendVerifyEmail (email: string) {
     const url = UserService.BASE_USERS_URL + '/ask-send-verify-email'
 
     return this.authHttp.post(url, { email })
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   autocomplete (search: string): Observable<string[]> {
@@ -216,18 +188,12 @@ export class UserService {
 
   addUser (userCreate: UserCreate) {
     return this.authHttp.post(UserService.BASE_USERS_URL, userCreate)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   updateUser (userId: number, userUpdate: UserUpdate) {
     return this.authHttp.put(UserService.BASE_USERS_URL + userId, userUpdate)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   updateUsers (users: UserServerModel[], userUpdate: UserUpdate) {
index a6799d3e18199ab1e9748f3ca1bc3911ed29fcde..a83f7c4ad56cae17ba18c71b5826dbb0fcd29e18 100644 (file)
@@ -71,49 +71,34 @@ export class InstanceFollowService {
     }
 
     return this.authHttp.post(InstanceFollowService.BASE_APPLICATION_URL + '/following', body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   unfollow (follow: ActorFollow) {
     const handle = follow.following.name + '@' + follow.following.host
 
     return this.authHttp.delete(InstanceFollowService.BASE_APPLICATION_URL + '/following/' + handle)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   acceptFollower (follow: ActorFollow) {
     const handle = follow.follower.name + '@' + follow.follower.host
 
     return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/accept`, {})
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   rejectFollower (follow: ActorFollow) {
     const handle = follow.follower.name + '@' + follow.follower.host
 
     return this.authHttp.post(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}/reject`, {})
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   removeFollower (follow: ActorFollow) {
     const handle = follow.follower.name + '@' + follow.follower.host
 
     return this.authHttp.delete(`${InstanceFollowService.BASE_APPLICATION_URL}/followers/${handle}`)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 }
index e5c2b3cd480778f57e99b717cf2d26a9e155403b..2914dd6d930ea8568b4a80d3aea087090ca99bf2 100644 (file)
@@ -1,5 +1,5 @@
 import { of } from 'rxjs'
-import { catchError, map } from 'rxjs/operators'
+import { catchError } from 'rxjs/operators'
 import { HttpClient } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { RestExtractor } from '@app/core'
@@ -30,9 +30,6 @@ export class CustomPageService {
 
   updateInstanceHomepage (content: string) {
     return this.authHttp.put(CustomPageService.BASE_INSTANCE_HOMEPAGE_URL, { content })
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(err => this.restExtractor.handleError(err))
-      )
+      .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 }
index 0cfb2d203f36c8ab0e5d95c12bb8d55c7f75ce78..4cebbc707788419a695fb13781147d338581f2b7 100644 (file)
@@ -1,4 +1,4 @@
-import { catchError, map, switchMap } from 'rxjs/operators'
+import { catchError, switchMap } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core'
@@ -43,9 +43,6 @@ export class UserHistoryService {
   clearAll () {
     return this.authHttp
                .post(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL + '/remove', {})
-               .pipe(
-                 map(() => this.restExtractor.extractDataBool()),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 }
index e90bb0f1fa412c80f2f28e03baa833b4665b7032..df886ed653dfdcf656449b21736f67c898ae63f7 100644 (file)
@@ -59,7 +59,6 @@ export class UserNotificationService {
 
     return this.authHttp.post(url, body, { context })
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => this.peertubeSocket.dispatchNotificationEvent('read')),
                  catchError(res => this.restExtractor.handleError(res))
                )
@@ -71,7 +70,6 @@ export class UserNotificationService {
 
     return this.authHttp.post(url, {}, { context })
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => this.peertubeSocket.dispatchNotificationEvent('read-all')),
                  catchError(res => this.restExtractor.handleError(res))
                )
@@ -81,10 +79,7 @@ export class UserNotificationService {
     const url = UserNotificationService.BASE_NOTIFICATION_SETTINGS
 
     return this.authHttp.put(url, settings)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   private formatNotification (notification: UserNotificationServer) {
index 29d6d0f4c65289f02dc32fa1c60f862501d0cfef..97b79d84268c0489bbdb25650a44fef9a49f2114 100644 (file)
@@ -42,10 +42,7 @@ export class VideoCaptionService {
 
   removeCaption (videoId: number | string, language: string) {
     return this.authHttp.delete(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   addCaption (videoId: number | string, language: string, captionfile: File) {
@@ -53,14 +50,11 @@ export class VideoCaptionService {
     const data = objectToFormData(body)
 
     return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`, data)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   updateCaptions (videoId: number | string, videoCaptions: VideoCaptionEdit[]) {
-    let obs = of(true)
+    let obs: Observable<any> = of(undefined)
 
     for (const videoCaption of videoCaptions) {
       if (videoCaption.action === 'CREATE') {
index dc00fabdc4767da9b6a4e9dc41fa9ad9022418cd..f37f13c51aa4764ec850798fde3003b50a69af0d 100644 (file)
@@ -69,18 +69,12 @@ export class VideoChannelService {
 
   createVideoChannel (videoChannel: VideoChannelCreate) {
     return this.authHttp.post(VideoChannelService.BASE_VIDEO_CHANNEL_URL, videoChannel)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   updateVideoChannel (videoChannelName: string, videoChannel: VideoChannelUpdate) {
     return this.authHttp.put(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName, videoChannel)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   changeVideoChannelImage (videoChannelName: string, avatarForm: FormData, type: 'avatar' | 'banner') {
@@ -94,17 +88,11 @@ export class VideoChannelService {
     const url = VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannelName + '/' + type
 
     return this.authHttp.delete(url)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   removeVideoChannel (videoChannel: VideoChannel) {
     return this.authHttp.delete(VideoChannelService.BASE_VIDEO_CHANNEL_URL + videoChannel.nameWithHost)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 }
index 966d7fafd426e76efa2f87488cb5080eca6796ed..4377d628a0da4ba25c92a52be4660cfe2c5a03d0 100644 (file)
@@ -1,6 +1,6 @@
 import { SortMeta } from 'primeng/api'
 import { concat, Observable } from 'rxjs'
-import { catchError, map, toArray } from 'rxjs/operators'
+import { catchError, toArray } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { RestExtractor, RestPagination, RestService } from '@app/core'
@@ -23,10 +23,7 @@ export class RedundancyService {
     const body = { redundancyAllowed }
 
     return this.authHttp.put(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   listVideoRedundancies (options: {
@@ -65,9 +62,6 @@ export class RedundancyService {
 
   private removeRedundancy (redundancyId: number) {
     return this.authHttp.delete(RedundancyService.BASE_REDUNDANCY_URL + '/videos/' + redundancyId)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(res => this.restExtractor.handleError(res))
-               )
+               .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 }
index 273930a6cf0b16fcc1d7483e0fdc2b5a727d7f30..bc0e1b1d10ca5fc4367a6fa27ba0cda75176de79 100644 (file)
@@ -25,10 +25,7 @@ export class VideoOwnershipService {
     }
 
     return this.authHttp.post(url, body)
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(res => this.restExtractor.handleError(res))
-      )
+      .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   getOwnershipChanges (pagination: RestPagination, sort: SortMeta): Observable<ResultList<VideoChangeOwnership>> {
@@ -47,18 +44,12 @@ export class VideoOwnershipService {
   acceptOwnership (id: number, input: VideoChangeOwnershipAccept) {
     const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/accept'
     return this.authHttp.post(url, input)
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(this.restExtractor.handleError)
-      )
+      .pipe(catchError(this.restExtractor.handleError))
   }
 
   refuseOwnership (id: number) {
     const url = VideoOwnershipService.BASE_VIDEO_CHANGE_OWNERSHIP_URL + 'ownership/' + id + '/refuse'
     return this.authHttp.post(url, {})
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(this.restExtractor.handleError)
-      )
+      .pipe(catchError(this.restExtractor.handleError))
   }
 }
index 9bfa397f8979e0d547af7753ba275eac9fcdb4ca..94af9cd389822e3c5f9d3b13e83568f5242cc083 100644 (file)
@@ -114,10 +114,7 @@ export class VideoService {
     const data = objectToFormData(body)
 
     return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${video.id}`, data)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   uploadVideo (video: FormData) {
@@ -449,9 +446,6 @@ export class VideoService {
 
     return this.authHttp
                .put(url, body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 }
index f45b5c8e86e2367356f55ef6494da48a651f4fe6..5d1539f69dfbd5b3223609e8c7e7017956d0e001 100644 (file)
@@ -1,7 +1,7 @@
 import { omit } from 'lodash-es'
 import { SortMeta } from 'primeng/api'
 import { Observable } from 'rxjs'
-import { catchError, map } from 'rxjs/operators'
+import { catchError } from 'rxjs/operators'
 import { HttpClient, HttpParams } from '@angular/common/http'
 import { Injectable } from '@angular/core'
 import { RestExtractor, RestPagination, RestService } from '@app/core'
@@ -77,40 +77,28 @@ export class AbuseService {
     const body = omit(parameters, [ 'id' ])
 
     return this.authHttp.post(url, body)
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(res => this.restExtractor.handleError(res))
-      )
+      .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   updateAbuse (abuse: AdminAbuse, abuseUpdate: AbuseUpdate) {
     const url = AbuseService.BASE_ABUSE_URL + '/' + abuse.id
 
     return this.authHttp.put(url, abuseUpdate)
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(res => this.restExtractor.handleError(res))
-      )
+      .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   removeAbuse (abuse: AdminAbuse) {
     const url = AbuseService.BASE_ABUSE_URL + '/' + abuse.id
 
     return this.authHttp.delete(url)
-      .pipe(
-        map(this.restExtractor.extractDataBool),
-        catchError(res => this.restExtractor.handleError(res))
-      )
+      .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   addAbuseMessage (abuse: UserAbuse, message: string) {
     const url = AbuseService.BASE_ABUSE_URL + '/' + abuse.id + '/messages'
 
     return this.authHttp.post(url, { message })
-    .pipe(
-      map(this.restExtractor.extractDataBool),
-      catchError(res => this.restExtractor.handleError(res))
-    )
+    .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   listAbuseMessages (abuse: UserAbuse) {
@@ -126,10 +114,7 @@ export class AbuseService {
     const url = AbuseService.BASE_ABUSE_URL + '/' + abuse.id + '/messages/' + abuseMessage.id
 
     return this.authHttp.delete(url)
-    .pipe(
-      map(this.restExtractor.extractDataBool),
-      catchError(res => this.restExtractor.handleError(res))
-    )
+    .pipe(catchError(res => this.restExtractor.handleError(res)))
   }
 
   getPrefefinedReasons (type: AbuseFilter) {
index ede65ff3981c0a6a5dd4610ab55d7492d9a5caba..33a2d04fd743a118fcdb2fe1ed7dd67bb0d912ae 100644 (file)
@@ -108,7 +108,6 @@ export class UserSubscriptionService {
 
     return this.authHttp.delete(url)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    this.myAccountSubscriptionCache[nameWithHost] = false
 
@@ -124,7 +123,6 @@ export class UserSubscriptionService {
     const body = { uri: nameWithHost }
     return this.authHttp.post(url, body)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    this.myAccountSubscriptionCache[nameWithHost] = true
 
index fd1cae7f89c17b46e2d2a62106699d761bba4037..6f2ef50cb0d09032d8bef553401a2a894b587a7a 100644 (file)
@@ -114,10 +114,7 @@ export class VideoCommentService {
 
     return this.authHttp
                .delete(url)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   deleteVideoComments (comments: { videoId: number | string, commentId: number }[]) {
index 44d930b074b065baee653beec05acdf16fad58f9..db9f78a7ab3e267b1c36f8e9cde778524788346e 100644 (file)
@@ -154,7 +154,6 @@ export class VideoPlaylistService {
 
     return this.authHttp.put(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + videoPlaylist.id, data)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    if (!this.myAccountPlaylistCache) return
 
@@ -170,7 +169,6 @@ export class VideoPlaylistService {
   removeVideoPlaylist (videoPlaylist: VideoPlaylist) {
     return this.authHttp.delete(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + videoPlaylist.id)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    if (!this.myAccountPlaylistCache) return
 
@@ -207,7 +205,6 @@ export class VideoPlaylistService {
   updateVideoOfPlaylist (playlistId: number, playlistElementId: number, body: VideoPlaylistElementUpdate, videoId: number) {
     return this.authHttp.put(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + playlistId + '/videos/' + playlistElementId, body)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    const existsResult = this.videoExistsCache[videoId]
 
@@ -227,7 +224,6 @@ export class VideoPlaylistService {
   removeVideoFromPlaylist (playlistId: number, playlistElementId: number, videoId?: number) {
     return this.authHttp.delete(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + playlistId + '/videos/' + playlistElementId)
                .pipe(
-                 map(this.restExtractor.extractDataBool),
                  tap(() => {
                    if (!videoId) return
 
@@ -249,10 +245,7 @@ export class VideoPlaylistService {
     }
 
     return this.authHttp.post(VideoPlaylistService.BASE_VIDEO_PLAYLIST_URL + playlistId + '/videos/reorder', body)
-               .pipe(
-                 map(this.restExtractor.extractDataBool),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   getPlaylistVideos (options: {