hmm
This commit is contained in:
@@ -80,8 +80,9 @@ export default function OrderNotifications() {
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
const timestamp = yesterday.toISOString();
|
||||
|
||||
// Include timestamp filter to reduce load
|
||||
const orderData = await clientFetch(`/orders?status=paid&limit=10&after=${timestamp}`);
|
||||
// Use orderDate parameter instead of 'after' to avoid backend casting errors
|
||||
// The error logs show that the 'after' parameter is being interpreted as 'orderId' incorrectly
|
||||
const orderData = await clientFetch(`/orders?status=paid&limit=10&orderDate[gte]=${timestamp}`);
|
||||
const orders: Order[] = orderData.orders || [];
|
||||
|
||||
// If this is the first fetch, just store the orders without notifications
|
||||
|
||||
Reference in New Issue
Block a user