Add pagination to orders and products (#106)
* Add pagination to orders and products * remove comment Co-authored-by: Anders Gustafsson <anders@photowall.se>
This commit is contained in:
co-authored by
Anders Gustafsson
parent
3d7a36afc4
commit
be5471f958
@@ -68,11 +68,11 @@ async function getProductsResult(
|
||||
checkAccess(['products.read'], auth);
|
||||
const total = (<ProductAPI>dataSources.productApi).getProductsTotal(input);
|
||||
const items = (<ProductAPI>dataSources.productApi).getProducts(input);
|
||||
|
||||
const offset = input.pagination?.offset ?? 0;
|
||||
return {
|
||||
pagination: {
|
||||
limit: input.pagination.limit,
|
||||
offset: 0, // TODO: this will be implemented later if the client app needs it
|
||||
offset: offset,
|
||||
total: total,
|
||||
},
|
||||
items: items,
|
||||
|
||||
Reference in New Issue
Block a user