diff options
author | Dan Timoney <dtimoney@att.com> | 2019-04-09 14:08:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-09 14:08:05 +0000 |
commit | e6b7eccbe411b9e257146dd64c244f7c99ff6fe2 (patch) | |
tree | fc229aeee8353e6f8e02dc60a415a1a71263e773 /cds-ui/server | |
parent | 4fade7ac50901b20d209975c8476b47301f2e840 (diff) | |
parent | a33ed515bd52347214f9fbcc19ccbb8eb79df903 (diff) |
Merge "Changed CBA download with name and version"
Diffstat (limited to 'cds-ui/server')
-rw-r--r-- | cds-ui/server/src/controllers/blueprint-rest.controller.ts | 9 |
1 files changed, 5 insertions, 4 deletions
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<any> { 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); |