diff --git a/server.js b/server.js index c71a2e4..bb865a6 100644 --- a/server.js +++ b/server.js @@ -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 };