From 7177b46ca1b35aa9d7ed39a06c1dcf41a4fc6180 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 18 Jan 2022 11:23:41 +0100 Subject: Add ability to delete history element --- client/src/app/shared/shared-main/users/user-history.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/shared-main/users/user-history.service.ts b/client/src/app/shared/shared-main/users/user-history.service.ts index a4841897d..e28bcdca9 100644 --- a/client/src/app/shared/shared-main/users/user-history.service.ts +++ b/client/src/app/shared/shared-main/users/user-history.service.ts @@ -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( -- cgit v1.2.3