fix: send Fone_Cliente from backend to frontend API response

This commit is contained in:
Cauê Faleiros
2026-05-22 13:40:31 -03:00
parent 174bb4841e
commit fc8a5e47a0

View File

@@ -90,7 +90,8 @@ const formatRow = (row) => ({
Quantidade: row.quantidade, Quantidade: row.quantidade,
Valor_Unitario: parseFloat(row.valor_unitario), Valor_Unitario: parseFloat(row.valor_unitario),
Recebido_Em: row.created_at, Recebido_Em: row.created_at,
ID_Pedido: row.pedido_id ID_Pedido: row.pedido_id,
Fone_Cliente: row.cliente_fone
}); });
// GET data (for the frontend) // GET data (for the frontend)
@@ -177,11 +178,6 @@ app.post('/api/data', authenticateAPIKey, async (req, res) => {
})(); })();
}); });
app.listen(PORT, '0.0.0.0', () => {
console.log(`Nexstar Backend running at http://localhost:${PORT}`);
console.log(`Endpoint for n8n: POST http://localhost:${PORT}/api/data`);
});;
app.listen(PORT, '0.0.0.0', () => { app.listen(PORT, '0.0.0.0', () => {
console.log(`Nexstar Backend running at http://localhost:${PORT}`); console.log(`Nexstar Backend running at http://localhost:${PORT}`);
console.log(`Endpoint for n8n: POST http://localhost:${PORT}/api/data`); console.log(`Endpoint for n8n: POST http://localhost:${PORT}/api/data`);