feat: pagination hints
This commit is contained in:
@@ -47,6 +47,9 @@ class CatalogueService:
|
||||
view.view_type = CatalogueType.PRODUCTS
|
||||
view.products = products[:PAGE_SIZE]
|
||||
view.has_next = len(products) > PAGE_SIZE
|
||||
view.total = await self.product_repo.count_products_by_category(
|
||||
session, cat_id, include_hidden=include_hidden
|
||||
)
|
||||
|
||||
return view
|
||||
view.view_type = CatalogueType.EMPTY
|
||||
|
||||
Reference in New Issue
Block a user