mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
feat: implement server-side product row data fetching with caching and aggregation logic
This commit is contained in:
1 parent
88a3121c92
commit
43644a7d1d
1 file changed
+1
-1
@@ -377,7 +377,7 @@ export async function getProductRows(input: GetProductRowsInput): Promise<GetPro
|
||||
return { rows: filtered, total, page: 0, pageSize: total, totalPages: 1 };
|
||||
}
|
||||
|
||||
const safePageSize = Math.max(1, Math.min(pageSize, 500));
|
||||
const safePageSize = Math.max(1, Math.min(pageSize, 20000));
|
||||
const totalPages = Math.ceil(total / safePageSize);
|
||||
const safePage = Math.max(0, Math.min(page, totalPages - 1));
|
||||
const start = safePage * safePageSize;
|
||||
|
||||
Reference in new issue
Block a user