From a33ed515bd52347214f9fbcc19ccbb8eb79df903 Mon Sep 17 00:00:00 2001 From: Ezhilarasi Date: Mon, 8 Apr 2019 20:57:54 +0530 Subject: Changed CBA download with name and version Change-Id: I6121e6248138569b2bb0908bb99d9059a1115784 Issue-ID: CCSDK-1068 Signed-off-by: Ezhilarasi --- cds-ui/server/src/controllers/blueprint-rest.controller.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cds-ui') diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts index c630ce060..c1f7f9640 100644 --- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts +++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts @@ -135,14 +135,15 @@ export class BlueprintRestController { }); } - @get('/download-blueprint/{id}') + @get('/download-blueprint/{name}/{version}') async download( - @param.path.string('id') id: string, - @inject(RestBindings.Http.REQUEST) request: Request, + @param.path.string('name') name: string, + @param.path.string('version') version:string, + // @inject(RestBindings.Http.REQUEST) request: Request, @inject(RestBindings.Http.RESPONSE) response: Response, ): Promise { return new Promise((resolve, reject) => { - this.downloadFileFromBlueprintController("/blueprint-model/download/" + id).then(resp=>{ + this.downloadFileFromBlueprintController("/blueprint-model/download/by-name/"+name+"/version/"+version).then(resp=>{ response.setHeader("X-ONAP-RequestID", resp.headers['x-onap-requestid']); response.setHeader("Content-Disposition", resp.headers['content-disposition']); resolve(resp.body); -- cgit 1.2.3-korg