aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services
diff options
context:
space:
mode:
authorJvD_Ericsson <jeff.van.dam@est.tech>2023-02-21 14:07:50 +0000
committerMichael Morris <michael.morris@est.tech>2023-02-22 14:16:42 +0000
commit9b8d90c9cdc012ca444d35465dc2e77662e4becf (patch)
treeef9f5f6d99a5bcc5eb40d965829d9a5c0128ea76 /catalog-ui/src/app/ng2/services
parent8aa94a97ebfff1205e85470d78202f598632dbd6 (diff)
Support delete non-normative data types
Issue-ID: SDC-4411 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I246e50d848a17178369bfb643989d5447a887017
Diffstat (limited to 'catalog-ui/src/app/ng2/services')
-rw-r--r--catalog-ui/src/app/ng2/services/data-type.service.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/services/data-type.service.ts b/catalog-ui/src/app/ng2/services/data-type.service.ts
index 636217fb68..d4af634cec 100644
--- a/catalog-ui/src/app/ng2/services/data-type.service.ts
+++ b/catalog-ui/src/app/ng2/services/data-type.service.ts
@@ -112,6 +112,15 @@ export class DataTypeService {
});
}
+ public deleteDataType(dataTypeId: string): Observable<Object> {
+ const url = `${this.dataTypeUrl}/${dataTypeId}`;
+ let headers = new HttpHeaders({'USER_ID': this.authService.getLoggedinUser().userId});
+ let options = {headers: headers};
+ return this.httpClient.delete(url, options).map((res: Response) => {
+ return dataTypeId;
+ });
+ }
+
public createImportedType(model: string, importingFile: File): Observable<any> {
const url = `${this.dataTypeUploadUrl}/datatypesyaml`;
const formData = new FormData();