fix: api order not working because of dropped param/incorrect handling, related to #9359

pull/9370/head
Luciano Righetti 2023-11-09 09:56:57 +01:00
parent c4b08ec36d
commit e1f99a2824
4 changed files with 7 additions and 5 deletions

View File

@ -59,7 +59,8 @@ class RestSearchComponent extends Component
'event_ids',
'includeAllTags',
'includeAttributeUuid',
'includeGalaxy'
'includeGalaxy',
'order'
],
'Event' => [
'returnFormat',
@ -188,7 +189,8 @@ class RestSearchComponent extends Component
'minimal',
'list',
'first',
'count'
'count',
'order'
],
);

View File

@ -1688,7 +1688,7 @@ class Attribute extends AppModel
}
$params['order'] = [];
if (!empty($options['order'])) {
$options['order'] = $this->findOrder(
$params['order'] = $this->findOrder(
$options['order'],
'Attribute',
['id', 'event_id', 'object_id', 'type', 'category', 'value', 'distribution', 'timestamp', 'object_relation']

View File

@ -1064,7 +1064,7 @@ class GalaxyCluster extends AppModel
$params['group'] = $options['group'];
}
if (!empty($options['order'])) {
$options['order'] = $this->findOrder(
$params['order'] = $this->findOrder(
$options['order'],
'GalaxyCluster',
['id', 'event_id', 'version', 'type', 'value', 'distribution', 'orgc_id', 'org_id', 'tag_name', 'galaxy_id']

View File

@ -1214,7 +1214,7 @@ class Workflow extends AppModel
$params['order'] = [];
if (!empty($options['order'])) {
$options['order'] = $this->findOrder(
$params['order'] = $this->findOrder(
$options['order'],
'Workflow',
['id', 'name', 'timestmap', 'trigger_id', 'counter']