This commit is contained in:
Jake Kasper
2025-08-26 07:19:08 -05:00
parent c842b09379
commit f1705b7857

View File

@@ -130,13 +130,11 @@ router.get('/plans', async (req, res, next) => {
productId: firstProduct.product_id, productId: firstProduct.product_id,
userProductId: firstProduct.user_product_id, userProductId: firstProduct.user_product_id,
sharedName: firstProduct.shared_name, sharedName: firstProduct.shared_name,
customProductType: firstProduct.custom_product_type productType: firstProduct.product_type
} }
}); });
const productType = firstProduct.shared_name ? const productType = firstProduct.product_type;
(await pool.query('SELECT product_type FROM products WHERE id = $1', [firstProduct.product_id])).rows[0]?.product_type :
firstProduct.custom_product_type;
console.log('Detected product type:', productType); console.log('Detected product type:', productType);