init search and display results
[arvados-workbench2.git] / src / services / groups-service / groups-service.ts
index c4c56f38fc514efaa602d377f2ef9d8a0e70e728..b0c1b56e97fd0d93347299206e0595c36764ee26 100644 (file)
@@ -45,14 +45,16 @@ export class GroupsService<T extends GroupResource = GroupResource> extends Tras
             order: order ? order : undefined
         };
 
+        const pathUrl = uuid ? `${uuid}/contents` : 'contents';
         const response = await CommonResourceService.defaultResponse(
-            this.serverApi
-                .get(this.resourceType + `${uuid}/contents`, {
-                    params: CommonResourceService.mapKeys(_.snakeCase)(params)
-                }),
-            this.actions, 
-            false
-        );
+                this.serverApi
+                    .get(this.resourceType + pathUrl, {
+                        params: CommonResourceService.mapKeys(_.snakeCase)(params)
+                    }),
+                this.actions, 
+                false
+            );
+
         const { items, ...res } = response;
         const mappedItems = items.map((item: GroupContentsResource) => {
             const mappedItem = TrashableResourceService.mapKeys(_.camelCase)(item);