From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../my-videos/modals/video-change-ownership.component.ts | 16 ++++++++-------- .../src/app/+my-library/my-videos/my-videos.component.ts | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'client/src/app/+my-library/my-videos') diff --git a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts index 84237dee1..8c1f94bf3 100644 --- a/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts +++ b/client/src/app/+my-library/my-videos/modals/video-change-ownership.component.ts @@ -48,11 +48,11 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni search (event: { query: string }) { const query = event.query this.userService.autocomplete(query) - .subscribe( - usernames => this.usernamePropositions = usernames, + .subscribe({ + next: usernames => this.usernamePropositions = usernames, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } changeOwnership () { @@ -60,10 +60,10 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni this.videoOwnershipService .changeOwnership(this.video.id, username) - .subscribe( - () => this.notifier.success($localize`Ownership change request sent.`), + .subscribe({ + next: () => this.notifier.success($localize`Ownership change request sent.`), - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } } diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index 1e4a4406d..4f9b71cc6 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts @@ -126,14 +126,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { concat(...observables) .pipe(toArray()) - .subscribe( - () => { + .subscribe({ + next: () => { this.notifier.success($localize`${toDeleteVideosIds.length} videos deleted.`) this.selection = {} }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } async deleteVideo (video: Video) { @@ -144,14 +144,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { if (res === false) return this.videoService.removeVideo(video.id) - .subscribe( - () => { + .subscribe({ + next: () => { this.notifier.success($localize`Video ${video.name} deleted.`) this.removeVideoFromArray(video.id) }, - error => this.notifier.error(error.message) - ) + error: err => this.notifier.error(err.message) + }) } changeOwnership (video: Video) { -- cgit v1.2.3