refactor payload creation in parameter.ts 21/57021/3
authorSandeep J <sandeejh@in.ibm.com>
Fri, 20 Jul 2018 08:23:22 +0000 (13:53 +0530)
committerTakamune Cho <tc012c@att.com>
Thu, 26 Jul 2018 13:11:20 +0000 (13:11 +0000)
refactor payload creation in getPD parameter.ts using createPayloadForRetrieve
method in utility.service.ts

Issue-ID: APPC-1099
Change-Id: I976dfebfe60a123784853a7294125cf6075a653b
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts

index 20204fd..19a5f6d 100644 (file)
@@ -190,15 +190,7 @@ export class ParameterComponent implements OnInit {
 
     public getPD() {
         let result: any;
-        let input = {
-            'input': {
-                'design-request': {
-                    'request-id': this.apiToken,
-                    'action': 'getArtifact',
-                    'payload': '{"userID": "' + this.userId + '", "vnf-type" : "' + this.vnfType + '", "artifact-type":"APPC-CONFIG", "artifact-name":"' + this.artifact_fileName + '"}'
-                }
-            }
-        };
+        let input=this.utilService.createPayloadForRetrieve(false, this.action, this.vnfType,this.artifact_fileName);
         let artifactContent: any;
         return this.httpService.post({
             url: environment.getDesigns,