]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/+admin/system/debug/debug.service.ts
Fix client lint
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / debug / debug.service.ts
... / ...
CommitLineData
1import { Observable } from 'rxjs'
2import { catchError } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http'
4import { Injectable } from '@angular/core'
5import { RestExtractor } from '@app/core'
6import { Debug } from '@shared/models'
7import { environment } from '../../../../environments/environment'
8
9@Injectable()
10export class DebugService {
11 private static BASE_DEBUG_URL = environment.apiUrl + '/api/v1/server/debug'
12
13 constructor (
14 private authHttp: HttpClient,
15 private restExtractor: RestExtractor
16 ) {}
17
18 getDebug (): Observable<Debug> {
19 return this.authHttp.get<Debug>(DebugService.BASE_DEBUG_URL)
20 .pipe(
21 catchError(err => this.restExtractor.handleError(err))
22 )
23 }
24}