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