15027: Removes code to avoid camel_case translation back to the api server.
[arvados-workbench2.git] / src / services / groups-service / groups-service.ts
index a676557a78afd4e44c3b5c1ae771077b63541f49..ac6ffb943bdba71999df06ff42bece2be19f80c9 100644 (file)
@@ -59,18 +59,7 @@ export class GroupsService<T extends GroupResource = GroupResource> extends Tras
             this.serverApi.get(this.resourceType + pathUrl, cfg), this.actions, false
         );
 
-        const { items, ...res } = response;
-        const mappedItems = (items || []).map((item: GroupContentsResource) => {
-            const mappedItem = TrashableResourceService.mapKeys(_.camelCase)(item);
-            if (item.kind === ResourceKind.COLLECTION || item.kind === ResourceKind.PROJECT) {
-                const { properties } = item;
-                return { ...mappedItem, properties };
-            } else {
-                return mappedItem;
-            }
-        });
-        const mappedResponse = { ...TrashableResourceService.mapKeys(_.camelCase)(res) };
-        return { ...mappedResponse, items: mappedItems, clusterId: session && session.clusterId };
+        return { ...TrashableResourceService.mapKeys(_.camelCase)(response), clusterId: session && session.clusterId };
     }
 
     shared(params: SharedArguments = {}): Promise<ListResults<GroupContentsResource>> {