]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/system/debug/debug.service.ts
fix headings order or add missing ones (#2871)
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / system / debug / debug.service.ts
CommitLineData
5d79474c
C
1import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core'
4import { Observable } from 'rxjs'
5import { environment } from '../../../../environments/environment'
6import { RestExtractor, RestService } from '../../../shared'
7import { Debug } from '@shared/models/server'
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 restService: RestService,
16 private restExtractor: RestExtractor
17 ) {}
18
19 getDebug (): Observable<Debug> {
20 return this.authHttp.get<Debug>(DebugService.BASE_DEBUG_URL)
21 .pipe(
22 catchError(err => this.restExtractor.handleError(err))
23 )
24 }
25}