aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/server
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-04-08 19:16:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-08 19:16:59 +0000
commit2973e9755cb2e7424eacaeb9e277cbd613605ec1 (patch)
tree102756e725c30051cd6883bde219253f3f3e2a19 /cds-ui/server
parent01d045f109c24749c9ed46f4008f496e4bf62bcb (diff)
parentd7d2b0657b18a96bc1889f8404d7b212f28922e6 (diff)
Merge "Adding delete catalog" into frankfurt
Diffstat (limited to 'cds-ui/server')
-rw-r--r--cds-ui/server/src/controllers/controller-catalog.controller.ts20
-rw-r--r--cds-ui/server/src/datasources/controller-catalog.datasource-template.ts30
-rw-r--r--cds-ui/server/src/services/controller-catalog.service.ts2
3 files changed, 26 insertions, 26 deletions
diff --git a/cds-ui/server/src/controllers/controller-catalog.controller.ts b/cds-ui/server/src/controllers/controller-catalog.controller.ts
index 20e1cded6..b55785dcc 100644
--- a/cds-ui/server/src/controllers/controller-catalog.controller.ts
+++ b/cds-ui/server/src/controllers/controller-catalog.controller.ts
@@ -60,14 +60,14 @@ export class ControllerCatalogController {
return await this.Ccservice.getDefinitionTypes(definitionType);
}
- @del('/controllercatalog/model-type/{name}', {
- responses: {
- '200': {
- content: { 'application/json': {} }
- }
- },
- })
- async delete(@param.path.string('name') name: string): Promise<JSON> {
- return await this.Ccservice.deleteCatalog(name);
- }
+ @del('/controllercatalog/{name}', {
+ responses: {
+ '200': {
+ content: { 'application/json': {} }
+ }
+ },
+ })
+ async delete(@param.path.string('name') name: string) {
+ return await this.Ccservice.delete(name);
+ }
}
diff --git a/cds-ui/server/src/datasources/controller-catalog.datasource-template.ts b/cds-ui/server/src/datasources/controller-catalog.datasource-template.ts
index e45741576..dcd732a1b 100644
--- a/cds-ui/server/src/datasources/controller-catalog.datasource-template.ts
+++ b/cds-ui/server/src/datasources/controller-catalog.datasource-template.ts
@@ -57,20 +57,20 @@ export default {
}
},
- {
- "template": {
- "method": "DEL",
- "url": processorApiConfig.http.url + "/model-type/{name}",
- "headers": {
- "accepts": "application/json",
- "content-type": "application/json",
- "authorization": processorApiConfig.http.authToken
- },
- "responsePath": "$.*"
- },
- "functions": {
- "delete": ["name"]
- }
- }
+ {
+ "template": {
+ "method": "DELETE",
+ "url": processorApiConfig.http.url + "/model-type/{name}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": processorApiConfig.http.authToken
+ },
+ "responsePath": "$.*"
+ },
+ "functions": {
+ "delete": ["name"]
+ }
+ }
]
}; \ No newline at end of file
diff --git a/cds-ui/server/src/services/controller-catalog.service.ts b/cds-ui/server/src/services/controller-catalog.service.ts
index 9b4880543..db8d8560c 100644
--- a/cds-ui/server/src/services/controller-catalog.service.ts
+++ b/cds-ui/server/src/services/controller-catalog.service.ts
@@ -6,7 +6,7 @@ export interface ControllerCatalogService {
getByTags(tags: string): Promise<JSON>;
save(controllerCatalog: JSON): Promise<JSON>;
getDefinitionTypes(definitionType: string): Promise<JSON>;
- deleteCatalog(name: string): Promise<JSON>;
+ delete(name: string): Promise<JSON>;
}
export class ControllerCatalogServiceProvider implements Provider<ControllerCatalogService> {