15768: removed submit func from ms popover Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados.git] / src / services / common-service / common-service.ts
index fe7467a6f794bc26019bda5b897585bf1c81fc68..8e9fe631701bd0877075774f6d3666dd9fa73ec1 100644 (file)
@@ -107,12 +107,14 @@ export class CommonService<T> {
         );
     }
 
-    delete(uuid: string): Promise<T> {
+    delete(uuid: string, showErrors?: boolean): Promise<T> {
         this.validateUuid(uuid);
         return CommonService.defaultResponse(
             this.serverApi
                 .delete(`/${this.resourceType}/${uuid}`),
-            this.actions
+            this.actions,
+            true, // mapKeys
+            showErrors
         );
     }
 
@@ -154,6 +156,7 @@ export class CommonService<T> {
             return CommonService.defaultResponse(
                 this.serverApi.get(`/${this.resourceType}`, { params }),
                 this.actions,
+                true,
                 showErrors
             );
         } else {
@@ -170,6 +173,7 @@ export class CommonService<T> {
             return CommonService.defaultResponse(
                 this.serverApi.post(`/${this.resourceType}`, formData, {}),
                 this.actions,
+                true,
                 showErrors
             );
         }
@@ -181,7 +185,7 @@ export class CommonService<T> {
             this.serverApi
                 .put<T>(`/${this.resourceType}/${uuid}`, data && CommonService.mapKeys(snakeCase)(data)),
             this.actions,
-            false,
+            undefined, // mapKeys
             showErrors
         );
     }