X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fdashboard%2Fdashboard.service.ts;h=ea4b7ebf770e4dd9e4fd2fa5d2cc0fe3dcddcfac;hb=7845281a4bdb97925cba281f133ef058f15a1f95;hp=9a79f143b91b483f1ba6ceebc27ab478153296c4;hpb=21f98d01948dabb1d6a89b60f5694969e42c9e63;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/dashboard/dashboard.service.ts b/webapp-frontend/src/app/services/dashboard/dashboard.service.ts index 9a79f143..ea4b7ebf 100644 --- a/webapp-frontend/src/app/services/dashboard/dashboard.service.ts +++ b/webapp-frontend/src/app/services/dashboard/dashboard.service.ts @@ -19,17 +19,19 @@ */ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { DashboardSuccessTransport, DashboardUser } from '../../interfaces/dashboard.types'; @Injectable({ providedIn: 'root' }) /** - * Services to query the dashboard's healthcheck controller. + * Services to query the dashboard's admin endpoints. */ export class DashboardService { - private basePath = 'api/dashboard/'; + private basePath = 'api/admin/'; constructor(private httpClient: HttpClient) { // injects to variable httpClient @@ -39,16 +41,24 @@ export class DashboardService { * Checks app health * @returns Observable that should yield a DashboardSuccessTransport */ - getHealth() { - return this.httpClient.get(this.basePath + 'health'); + getHealth(): Observable { + return this.httpClient.get(this.basePath + 'health'); } /** * Gets Dashboard version details * @returns Observable that should yield a DashboardSuccessTransport object */ - getVersion() { - return this.httpClient.get(this.basePath + 'version'); + getVersion(): Observable { + return this.httpClient.get(this.basePath + 'version'); + } + + /** + * Gets Dashboard users + * @returns Observable that should yield a DashboardUser array + */ + getUsers(): Observable { + return this.httpClient.get(this.basePath + 'user'); } }