tango-app-api-audit 3.4.68-beta.2 → 3.4.68-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -16,7 +16,8 @@ export async function getList( req, res ) {
|
|
|
16
16
|
const limit = inputData.limit || 10;
|
|
17
17
|
const offset = inputData.offset ? ( inputData.offset - 1 ) * limit : 0;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const sortBy = `${inputData?.sortBy}.keyword`;
|
|
20
|
+
const order = inputData?.sortOrder || -1;
|
|
20
21
|
let filter= [
|
|
21
22
|
{
|
|
22
23
|
'range': {
|
|
@@ -125,9 +126,7 @@ export async function getList( req, res ) {
|
|
|
125
126
|
{ date: { order: 'desc' } },
|
|
126
127
|
],
|
|
127
128
|
};
|
|
128
|
-
if (
|
|
129
|
-
const sortBy = inputData.sortBy;
|
|
130
|
-
const order = inputData.sortOrder || -1;
|
|
129
|
+
if ( sortBy && sortBy !== '' ) {
|
|
131
130
|
searchQuery={
|
|
132
131
|
'from': offset,
|
|
133
132
|
'size': limit,
|