From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- .../shared-main/auth/auth-interceptor.service.ts | 2 +- .../users/user-notifications.component.ts | 24 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'client/src/app/shared/shared-main') diff --git a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts index a75c8a25c..51248c7b2 100644 --- a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts +++ b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts @@ -36,7 +36,7 @@ export class AuthInterceptor implements HttpInterceptor { return this.handleNotAuthenticated(err) } - return observableThrowError(err) + return observableThrowError(() => err) }) ) } diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.ts b/client/src/app/shared/shared-main/users/user-notifications.component.ts index 96b141543..50005b855 100644 --- a/client/src/app/shared/shared-main/users/user-notifications.component.ts +++ b/client/src/app/shared/shared-main/users/user-notifications.component.ts @@ -56,8 +56,8 @@ export class UserNotificationsComponent implements OnInit { } this.userNotificationService.listMyNotifications(options) - .subscribe( - result => { + .subscribe({ + next: result => { this.notifications = reset ? result.data : this.notifications.concat(result.data) this.componentPagination.totalItems = result.total @@ -66,8 +66,8 @@ export class UserNotificationsComponent implements OnInit { this.onDataSubject.next(result.data) }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } onNearOfBottom () { @@ -84,26 +84,26 @@ export class UserNotificationsComponent implements OnInit { if (notification.read) return this.userNotificationService.markAsRead(notification) - .subscribe( - () => { + .subscribe({ + next: () => { notification.read = true }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } markAllAsRead () { this.userNotificationService.markAllAsRead() - .subscribe( - () => { + .subscribe({ + next: () => { for (const notification of this.notifications) { notification.read = true } }, - err => this.notifier.error(err.message) - ) + error: err => this.notifier.error(err.message) + }) } changeSortColumn (column: string) { -- cgit v1.2.3