You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
740 B
TypeScript
25 lines
740 B
TypeScript
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<any[]> {
|
|
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 [];
|
|
})
|
|
);
|
|
}
|
|
}
|