Merge branch '21128-toolbar-context-menu'
[arvados-workbench2.git] / src / services / common-service / common-service.ts
index 9a5b767306023ce21673d26427a23d721bd785b6..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
             );
         }