fix: attach device_name to order items in API checkout route
All checks were successful
Staging Build / build (push) Successful in 2m47s
All checks were successful
Staging Build / build (push) Successful in 2m47s
This commit is contained in:
@@ -76,7 +76,11 @@ export async function POST(request: Request) {
|
|||||||
type === 'purchase' ? 'one_time' : 'monthly',
|
type === 'purchase' ? 'one_time' : 'monthly',
|
||||||
item.moduleQuantities
|
item.moduleQuantities
|
||||||
);
|
);
|
||||||
orderItemsList.push(...itemSnapshot.items);
|
const itemsWithDevice = itemSnapshot.items.map(i => ({
|
||||||
|
...i,
|
||||||
|
device_name: item.deviceName
|
||||||
|
}));
|
||||||
|
orderItemsList.push(...itemsWithDevice);
|
||||||
total += itemSnapshot.total;
|
total += itemSnapshot.total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user