From 2b6863266a3bb293d61a9c39532718a3cc22c266 Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 20 Jul 2018 13:53:22 +0530 Subject: refactor payload creation in parameter.ts 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 --- .../parameter-definitions/parameter.component.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/app') diff --git a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts index 20204fd..19a5f6d 100644 --- a/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts +++ b/src/app/vnfs/build-artifacts/parameter-definitions/parameter.component.ts @@ -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, -- cgit 1.2.3-korg