Actualizar server.js
This commit is contained in:
@@ -2162,11 +2162,12 @@ app.get("/public/portal/:token", async (req, res) => {
|
|||||||
const client = qClient.rows[0];
|
const client = qClient.rows[0];
|
||||||
const ownerId = client.owner_id;
|
const ownerId = client.owner_id;
|
||||||
|
|
||||||
// 2. 🛑 FIX CRÍTICO: PEDIMOS BILLING_SETTINGS A LA BBDD
|
// 2. 🛑 FIX CRÍTICO: PEDIMOS BILLING_SETTINGS Y PUBLICIDAD A LA BBDD
|
||||||
const qConfig = await pool.query("SELECT full_name, company_logo, billing_settings FROM users WHERE id = $1", [ownerId]);
|
const qConfig = await pool.query("SELECT full_name, company_logo, company_ad, billing_settings FROM users WHERE id = $1", [ownerId]);
|
||||||
const company = {
|
const company = {
|
||||||
name: qConfig.rows[0]?.full_name || "IntegraRepara",
|
name: qConfig.rows[0]?.full_name || "IntegraRepara",
|
||||||
logo: qConfig.rows[0]?.company_logo || null,
|
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
|
billing_settings: qConfig.rows[0]?.billing_settings || null // AQUÍ VIAJA EL IBAN Y LAS OBSERVACIONES
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user