From 4b701b226f687a906e9780d86d8ca3549ed1fd47 Mon Sep 17 00:00:00 2001 From: nicgirault Date: Mon, 18 Sep 2023 16:47:25 +0200 Subject: [PATCH] fix: fix search ignored --- src/getList/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/getList/index.ts b/src/getList/index.ts index a6b9cd0..6878c99 100644 --- a/src/getList/index.ts +++ b/src/getList/index.ts @@ -54,14 +54,11 @@ export const parseQuery = async (query: any, filtersOption: FiltersOption) => { const [from, to] = range ? JSON.parse(range) : [0, 10000] - const { q, ...filters } = JSON.parse(filter || '{}') - return { offset: from, limit: to - from + 1, - filter: await getFilter(filters, filtersOption), + filter: await getFilter(JSON.parse(filter || '{}'), filtersOption), order: [sort ? JSON.parse(sort) : ['id', 'ASC']] as [[string, string]], - q, } }