X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fcatalog%2Fcatalog.service.ts;h=586df92e0ef214339007712d3db8afc011f4b649;hb=2239b1d982aafe5e7dce4dbbec5100f3e3191249;hp=fac75d8325200213aab925055b54f901a13191cd;hpb=ca47b9c9b9a52aee1a23bf695e8dc9e76c132d74;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/catalog/catalog.service.ts b/webapp-frontend/src/app/services/catalog/catalog.service.ts index fac75d83..586df92e 100644 --- a/webapp-frontend/src/app/services/catalog/catalog.service.ts +++ b/webapp-frontend/src/app/services/catalog/catalog.service.ts @@ -20,22 +20,24 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; +import { XMXappInfo } from '../../interfaces/xapp-mgr.types'; @Injectable() export class CatalogService { - - constructor(private http: HttpClient) { + + constructor(private httpClient: HttpClient) { + // injects to variable httpClient } getAll() { - return this.http.get('api/xappmgr/xapps'); + return this.httpClient.get('api/xappmgr/xapps'); + } + + deployXapp(name) { + let xappInfo: XMXappInfo = { + xAppName: name + }; + return this.httpClient.post('api/xappmgr/xapps', xappInfo, { observe: 'response' }); } - deployXapp(name) { - return this.http.post('api/xappmgr/xapps', - { - "xAppName": name - }); - } - }