1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

handle no dids usecase in query (#818)

This commit is contained in:
Norbi 2021-08-31 10:26:17 +03:00 committed by GitHub
parent 238fd2bbe3
commit c6f4220f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,10 +24,10 @@ async function getQueryHighest(
const [dids, didsLength] = await getHighestLiquidityDIDs(chainIds)
const queryHighest = {
page: 1,
offset: didsLength,
offset: didsLength > 0 ? didsLength : 1,
query: {
query_string: {
query: `(${dids}) AND (${transformChainIdsListToQuery(
query: `${dids && `(${dids}) AND`}(${transformChainIdsListToQuery(
chainIds
)}) AND -isInPurgatory:true `,
fields: ['dataToken']