Merge branch '17595-Selecting-multiple-collections-as-inputs-to-a-workflow'
[arvados-workbench2.git] / src / services / common-service / trashable-resource-service.ts
index 633b2fbd89cdf09041e4c93ee001916599763d62..63be3ab866673ee98084579d48bd160734ffa5f4 100644 (file)
@@ -10,14 +10,14 @@ import { ApiActions } from "~/services/api/api-actions";
 
 export class TrashableResourceService<T extends TrashableResource> extends CommonResourceService<T> {
 
-    constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions) {
-        super(serverApi, resourceType, actions);
+    constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions, readOnlyFields: string[] = []) {
+        super(serverApi, resourceType, actions, readOnlyFields);
     }
 
     trash(uuid: string): Promise<T> {
         return CommonResourceService.defaultResponse(
             this.serverApi
-                .post(this.resourceType + `${uuid}/trash`),
+                .post(this.resourceType + `/${uuid}/trash`),
             this.actions
         );
     }
@@ -28,7 +28,7 @@ export class TrashableResourceService<T extends TrashableResource> extends Commo
         };
         return CommonResourceService.defaultResponse(
             this.serverApi
-                .post(this.resourceType + `${uuid}/untrash`, {
+                .post(this.resourceType + `/${uuid}/untrash`, {
                     params: CommonResourceService.mapKeys(_.snakeCase)(params)
                 }),
             this.actions