1 import { Observable } from 'rxjs'
2 import { catchError } from 'rxjs/operators'
3 import { HttpClient } from '@angular/common/http'
4 import { Injectable } from '@angular/core'
5 import { RestExtractor } from '@app/core'
6 import { Debug } from '@shared/models'
7 import { environment } from '../../../../environments/environment'
10 export class DebugService {
11 private static BASE_DEBUG_URL = environment.apiUrl + '/api/v1/server/debug'
14 private authHttp: HttpClient,
15 private restExtractor: RestExtractor
18 getDebug (): Observable<Debug> {
19 return this.authHttp.get<Debug>(DebugService.BASE_DEBUG_URL)
21 catchError(err => this.restExtractor.handleError(err))