diff --git a/lib/json_server.pl b/lib/json_server.pl index 79015b8c0..d50e5e2e9 100755 --- a/lib/json_server.pl +++ b/lib/json_server.pl @@ -514,17 +514,22 @@ sub json_get { } else { - # Restrict object list by type here to make things faster - if ( $args{type} ) { - for ( @{ $args{type} } ) { - push @objects, &list_objects_by_type($_); - } - } - elsif ( $args{parents} ) { + + if ( $args{parents} ) { # Restrict object list by group here to make things faster for ( @{ $args{parents} } ) { push @objects, &list_objects_by_group( $_, 1 ) } } + elsif ( $args{category} ) { + for ( @{ $args{category} } ) { + push @objects, &list_objects_by_webname( $_ ) + } + } + elsif ( $args{type} ) { # Restrict object list by type here to make things faster + for ( @{ $args{type} } ) { + push @objects, &list_objects_by_type($_); + } + } else { foreach my $object_type ( list_object_types() ) { push @objects, &list_objects_by_type($object_type);