Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
@@ -4,6 +4,7 @@ app.use(express.json());
|
|
4 |
|
5 |
app.post('/shipping-rates', (req, res) => {
|
6 |
// Compute the weight of all items
|
|
|
7 |
const weight = req.body.rate.items.reduce((acc, item) => acc + item.grams, 0);
|
8 |
res.json({ "rates": [ {
|
9 |
"service_name": "Transporteur privée",
|
|
|
4 |
|
5 |
app.post('/shipping-rates', (req, res) => {
|
6 |
// Compute the weight of all items
|
7 |
+
console.log(req.body);
|
8 |
const weight = req.body.rate.items.reduce((acc, item) => acc + item.grams, 0);
|
9 |
res.json({ "rates": [ {
|
10 |
"service_name": "Transporteur privée",
|