import { Injectable } from '@angular/core'; import { map, Observable } from 'rxjs'; import { URIKey } from '../../utils/uri-enums'; import { HttpErrorResponse, HttpParams } from '@angular/common/http'; import { HttpURIService } from '../../app.http.uri.service'; @Injectable({ providedIn: 'root' }) export class TransactionLogService { constructor(private httpUriService: HttpURIService) { } getTransactionLogs(): Observable { const params = new HttpParams(); return this.httpUriService.requestGET(URIKey.TRANSACTION_LOGS, params).pipe(map((response: any) => { if (!(response instanceof HttpErrorResponse)) { return Array.isArray(response) ? response : []; } return []; }) ); } }