From 5d79474cc66383ecbfcef6366f63a34c3af21cbf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Apr 2019 10:56:29 +0200 Subject: Add debug component to help admins to fix IP issues --- .../src/app/+admin/system/debug/debug.service.ts | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 client/src/app/+admin/system/debug/debug.service.ts (limited to 'client/src/app/+admin/system/debug/debug.service.ts') diff --git a/client/src/app/+admin/system/debug/debug.service.ts b/client/src/app/+admin/system/debug/debug.service.ts new file mode 100644 index 000000000..6c722d177 --- /dev/null +++ b/client/src/app/+admin/system/debug/debug.service.ts @@ -0,0 +1,25 @@ +import { catchError } from 'rxjs/operators' +import { HttpClient } from '@angular/common/http' +import { Injectable } from '@angular/core' +import { Observable } from 'rxjs' +import { environment } from '../../../../environments/environment' +import { RestExtractor, RestService } from '../../../shared' +import { Debug } from '@shared/models/server' + +@Injectable() +export class DebugService { + private static BASE_DEBUG_URL = environment.apiUrl + '/api/v1/server/debug' + + constructor ( + private authHttp: HttpClient, + private restService: RestService, + private restExtractor: RestExtractor + ) {} + + getDebug (): Observable { + return this.authHttp.get(DebugService.BASE_DEBUG_URL) + .pipe( + catchError(err => this.restExtractor.handleError(err)) + ) + } +} -- cgit v1.2.3