X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/aafa91ce918b23cff556f73e337ad8fe76ed578a..9ea56060efd17410075fc213f347867e51955224:/src/services/common-service/trashable-resource-service.ts diff --git a/src/services/common-service/trashable-resource-service.ts b/src/services/common-service/trashable-resource-service.ts index 633b2fbd..63be3ab8 100644 --- a/src/services/common-service/trashable-resource-service.ts +++ b/src/services/common-service/trashable-resource-service.ts @@ -10,14 +10,14 @@ import { ApiActions } from "~/services/api/api-actions"; export class TrashableResourceService extends CommonResourceService { - 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 { return CommonResourceService.defaultResponse( this.serverApi - .post(this.resourceType + `${uuid}/trash`), + .post(this.resourceType + `/${uuid}/trash`), this.actions ); } @@ -28,7 +28,7 @@ export class TrashableResourceService extends Commo }; return CommonResourceService.defaultResponse( this.serverApi - .post(this.resourceType + `${uuid}/untrash`, { + .post(this.resourceType + `/${uuid}/untrash`, { params: CommonResourceService.mapKeys(_.snakeCase)(params) }), this.actions