From 3bfbc37d5e4d383bef9653b3b2bcd10080c37f1c Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 2 Oct 2020 17:10:59 +0200 Subject: [PATCH] openvidu-server dashboard updated to use new REST API path --- .../src/dashboard/src/app/services/rest.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openvidu-server/src/dashboard/src/app/services/rest.service.ts b/openvidu-server/src/dashboard/src/app/services/rest.service.ts index 0e2425d6..0abfea57 100644 --- a/openvidu-server/src/dashboard/src/app/services/rest.service.ts +++ b/openvidu-server/src/dashboard/src/app/services/rest.service.ts @@ -7,6 +7,7 @@ import { throwError } from 'rxjs'; export class RestService { private openviduPublicUrl: string; + private API_PATH: string = 'openvidu/api'; constructor(private httpClient: HttpClient) { } @@ -16,7 +17,7 @@ export class RestService { resolve(this.openviduPublicUrl); } else { this.httpClient.get(location.protocol + '//' + location.hostname + ((!!location.port) ? (':' + location.port) : '') + - '/config/openvidu-publicurl', { responseType: 'text' }).pipe( + '/' + this.API_PATH + '/config/openvidu-publicurl', { responseType: 'text' }).pipe( catchError(error => { reject(error); return throwError(error); @@ -44,7 +45,7 @@ export class RestService { 'Content-Type': 'application/json' }) }; - this.httpClient.post(this.openviduPublicUrl + 'api/sessions', body, options) + this.httpClient.post(this.openviduPublicUrl + this.API_PATH + '/sessions', body, options) .pipe( catchError(error => { reject(error); @@ -66,7 +67,7 @@ export class RestService { 'Content-Type': 'application/json' }) }; - this.httpClient.post(this.openviduPublicUrl + 'api/tokens', body, options) + this.httpClient.post(this.openviduPublicUrl + this.API_PATH + '/tokens', body, options) .pipe( catchError(error => { reject(error);