impresso/impresso-middle-layer

/collectionsItems endpoint: filter by collection

Closed this issue · 1 comments

    services.collectionsItems.find({
      query: {
        collection_uid: collection.uid,
        resolve: 'item',
      },
    }),

returns an array.
result[1].data = array of 10 items belonging any collection

Expected: array of items belonging to passed collection.

@PaulSchroeder replace your query with:

services.collectionsItems.find({
      query: {
          collection_uids: [
              collection.uid,
          ],
          resolve: 'item',
      },
});