Skip to content

Commit

Permalink
Removed isListed check for owner search (#70)
Browse files Browse the repository at this point in the history
* Removed isListed check for owner search

* changed key
  • Loading branch information
kailash-bitpack committed May 15, 2023
1 parent ac43bc7 commit f2f0bea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@merokudao/dapp-store-registry",
"version": "0.1.44",
"version": "0.1.45",
"description": "The dApp Store registry for MerokuDAO dAapp Store",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export const searchFilters = (
}
});

if (dappId) query.bool.must.push({ term: { id: dappId.trim() } });
if (dappId) query.bool.must.push({ term: { dappId: dappId.trim() } });

// search on customer string
if (!!search && search.length) {
Expand All @@ -452,7 +452,7 @@ export const searchFilters = (

if (ownerAddress) query.bool.must.push({ match: { ownerAddress } });

if (isListed && !searchById && !search)
if (isListed && !searchById && !search && !ownerAddress)
query.bool.must.push({
match: { isListed: isListed === "true" ? true : false }
});
Expand Down
3 changes: 1 addition & 2 deletions src/lib/v1/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ export class DappStoreRegistryV1 {
ownerAddress: string
): Promise<StandardResponse> => {
const { finalQuery } = searchFilters("", {
ownerAddress,
onlyByOwnerAddress: true
ownerAddress
});
const result: SearchResult = await this.opensearchApis.search(
searchRegistry.alias,
Expand Down

0 comments on commit f2f0bea

Please sign in to comment.