From 1378c0d343028f3d40d7d795422684ab9e6a1599 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Aug 2021 11:27:47 +0200 Subject: Fix client lint --- client/src/app/core/confirm/confirm.service.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'client/src/app/core/confirm/confirm.service.ts') diff --git a/client/src/app/core/confirm/confirm.service.ts b/client/src/app/core/confirm/confirm.service.ts index 6e042c16b..338b8762c 100644 --- a/client/src/app/core/confirm/confirm.service.ts +++ b/client/src/app/core/confirm/confirm.service.ts @@ -1,6 +1,5 @@ -import { first } from 'rxjs/operators' +import { firstValueFrom, Subject } from 'rxjs' import { Injectable } from '@angular/core' -import { Subject } from 'rxjs' type ConfirmOptions = { title: string @@ -18,16 +17,12 @@ export class ConfirmService { confirm (message: string, title = '', confirmButtonText?: string) { this.showConfirm.next({ title, message, confirmButtonText }) - return this.confirmResponse.asObservable() - .pipe(first()) - .toPromise() + return firstValueFrom(this.confirmResponse.asObservable()) } confirmWithInput (message: string, inputLabel: string, expectedInputValue: string, title = '', confirmButtonText?: string) { this.showConfirm.next({ title, message, inputLabel, expectedInputValue, confirmButtonText }) - return this.confirmResponse.asObservable() - .pipe(first()) - .toPromise() + return firstValueFrom(this.confirmResponse.asObservable()) } } -- cgit v1.2.3