Actualizar server.js

This commit is contained in:
2026-05-17 21:09:55 +00:00
parent 2583b5b69c
commit 5eb0226a79

View File

@@ -2162,11 +2162,12 @@ app.get("/public/portal/:token", async (req, res) => {
const client = qClient.rows[0];
const ownerId = client.owner_id;
// 2. 🛑 FIX CRÍTICO: PEDIMOS BILLING_SETTINGS A LA BBDD
const qConfig = await pool.query("SELECT full_name, company_logo, billing_settings FROM users WHERE id = $1", [ownerId]);
// 2. 🛑 FIX CRÍTICO: PEDIMOS BILLING_SETTINGS Y PUBLICIDAD A LA BBDD
const qConfig = await pool.query("SELECT full_name, company_logo, company_ad, billing_settings FROM users WHERE id = $1", [ownerId]);
const company = {
name: qConfig.rows[0]?.full_name || "IntegraRepara",
logo: qConfig.rows[0]?.company_logo || null,
ad: qConfig.rows[0]?.company_ad || null,
billing_settings: qConfig.rows[0]?.billing_settings || null // AQUÍ VIAJA EL IBAN Y LAS OBSERVACIONES
};