Skip to content

Commit

Permalink
update sort order for exception list item call
Browse files Browse the repository at this point in the history
  • Loading branch information
yctercero committed Sep 2, 2020
1 parent 70cea48 commit 3f725f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x-pack/plugins/lists/public/exceptions/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ describe('Exceptions Lists API', () => {
namespace_type: 'single,single',
page: '1',
per_page: '20',
sort_field: 'entries.field',
sort_order: 'desc',
},
signal: abortCtrl.signal,
});
Expand Down Expand Up @@ -406,6 +408,8 @@ describe('Exceptions Lists API', () => {
namespace_type: 'single',
page: '1',
per_page: '20',
sort_field: 'entries.field',
sort_order: 'desc',
},
signal: abortCtrl.signal,
});
Expand Down Expand Up @@ -437,6 +441,8 @@ describe('Exceptions Lists API', () => {
namespace_type: 'agnostic',
page: '1',
per_page: '20',
sort_field: 'entries.field',
sort_order: 'desc',
},
signal: abortCtrl.signal,
});
Expand Down Expand Up @@ -468,6 +474,8 @@ describe('Exceptions Lists API', () => {
namespace_type: 'agnostic',
page: '1',
per_page: '20',
sort_field: 'entries.field',
sort_order: 'desc',
},
signal: abortCtrl.signal,
});
Expand Down Expand Up @@ -500,6 +508,8 @@ describe('Exceptions Lists API', () => {
namespace_type: 'agnostic',
page: '1',
per_page: '20',
sort_field: 'entries.field',
sort_order: 'desc',
},
signal: abortCtrl.signal,
});
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/lists/public/exceptions/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ export const fetchExceptionListsItemsByListIds = async ({
namespace_type: namespaceTypes.join(','),
page: pagination.page ? `${pagination.page}` : '1',
per_page: pagination.perPage ? `${pagination.perPage}` : '20',
sort_field: 'entries.field',
sort_order: 'desc',
...(filters.trim() !== '' ? { filter: filters } : {}),
};
const [validatedRequest, errorsRequest] = validate(query, findExceptionListItemSchema);
Expand Down

0 comments on commit 3f725f0

Please sign in to comment.