]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/users/user-history.service.ts
Add ability to delete history element
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / users / user-history.service.ts
index a4841897dba9e1bdff6bebce7ea3792299a7c90a..e28bcdca943c1dc31679979ad0c4f4f4b3fda6f8 100644 (file)
@@ -34,7 +34,13 @@ export class UserHistoryService {
                )
   }
 
-  deleteUserVideosHistory () {
+  deleteUserVideoHistoryElement (video: Video) {
+    return this.authHttp
+               .delete(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL + '/' + video.id)
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
+  }
+
+  clearAllUserVideosHistory () {
     return this.authHttp
                .post(UserHistoryService.BASE_USER_VIDEOS_HISTORY_URL + '/remove', {})
                .pipe(