X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fcatalog%2Fcatalog.service.ts;fp=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fcatalog%2Fcatalog.service.ts;h=586df92e0ef214339007712d3db8afc011f4b649;hb=2239b1d982aafe5e7dce4dbbec5100f3e3191249;hp=f412a4ed83d6195e6eb90bb4a410a616bf746308;hpb=2316ebd446dc9993b7c364ccb96d24f009195aa8;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 f412a4ed..586df92e 100644 --- a/webapp-frontend/src/app/services/catalog/catalog.service.ts +++ b/webapp-frontend/src/app/services/catalog/catalog.service.ts @@ -20,23 +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) { - return this.http.post('api/xappmgr/xapps', - { - "xAppName": name - } - , { observe: 'response' }); + let xappInfo: XMXappInfo = { + xAppName: name + }; + return this.httpClient.post('api/xappmgr/xapps', xappInfo, { observe: 'response' }); } }