@@ -41,6 +41,7 @@ import { Operation } from 'fast-json-patch';
4141import { RestRequestMethod } from '../data/rest-request-method' ;
4242import { dataService } from '../data/base/data-service.decorator' ;
4343import { getGroupEditRoute } from '../../access-control/access-control-routing-paths' ;
44+ import { isNotEmpty } from '../../shared/empty.util' ;
4445
4546const groupRegistryStateSelector = ( state : AppState ) => state . groupRegistry ;
4647const editGroupSelector = createSelector ( groupRegistryStateSelector , ( groupRegistryState : GroupRegistryState ) => groupRegistryState . editGroup ) ;
@@ -56,7 +57,7 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
5657 public subgroupsEndpoint = 'subgroups' ;
5758
5859 private createData : CreateData < Group > ;
59- private searchData : SearchData < Group > ;
60+ private searchData : SearchDataImpl < Group > ;
6061 private patchData : PatchData < Group > ;
6162 private deleteData : DeleteData < Group > ;
6263
@@ -91,9 +92,9 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
9192 const options = new FindListOptions ( ) ;
9293 options . searchParams = [ new RequestParam ( 'groupName' , groupName ) ] ;
9394
94- return this . searchBy ( searchHref , options ) . pipe (
95+ return this . findByHref ( this . searchData . getSearchByHref ( searchHref , options ) ) . pipe (
9596 getRemoteDataPayload ( ) ,
96- map ( ( groups : PaginatedList < Group > ) => groups . totalElements > 0 ) ,
97+ map ( ( group : Group ) => isNotEmpty ( group ) ) ,
9798 catchError ( ( ) => observableOf ( false ) ) ,
9899 ) ;
99100 }
0 commit comments