]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/system/debug/debug.service.ts
Fix print transcode command test
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / debug / debug.service.ts
CommitLineData
67ed6552 1import { Observable } from 'rxjs'
5d79474c
C
2import { catchError } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http'
4import { Injectable } from '@angular/core'
67ed6552
C
5import { RestExtractor } from '@app/core'
6import { Debug } from '@shared/models'
5d79474c 7import { environment } from '../../../../environments/environment'
5d79474c
C
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,
5d79474c
C
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}