nevermined-io/cli

Assets search is not returning the correct number of pages

Opened this issue · 0 comments

Describe the bug

Assets search is not returning the correct number of pages

Executing in the CLI the command

['ncli', 'assets', 'search', 'Uniswap', '-n', 'Mumbai', '--page', '1', '--json', '--onlyMetadata']

Returns
{"page":1,"totalPages":1,"totalResults":{"value":44,"relation":"eq"},"results":..... The total number of the assets returned is 44 but only one page, and there are 10 items per page, so should be 4 pages.

The same query in the frontend using the SDK returns 4 pages:
image

Maybe the offset is not sent in the SDK?

This is the query sent in the frontend

sdk.assets .query({ offset: pageSize, page, query: query! as any, sort: { created: 'desc' } })

To Reproduce

Steps to reproduce the behavior:
1.
2.

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.