From e8ba897edcf5ffbd151c8d0e9c30799419c84480 Mon Sep 17 00:00:00 2001 From: Jake Kasper Date: Sat, 23 Aug 2025 12:46:35 -0400 Subject: [PATCH] nozzles --- backend/src/routes/nozzles.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/routes/nozzles.js b/backend/src/routes/nozzles.js index 5a34bbc..e4d7efe 100644 --- a/backend/src/routes/nozzles.js +++ b/backend/src/routes/nozzles.js @@ -179,6 +179,16 @@ router.get('/', async (req, res, next) => { ); console.log('All user equipment:', allEquipment.rows); + // Debug: Check if there are ANY nozzles in the system for any user + const anyNozzles = await pool.query( + `SELECT ue.id, ue.custom_name, ue.user_id, ec.name as category_name + FROM user_equipment ue + JOIN equipment_types et ON ue.equipment_type_id = et.id + JOIN equipment_categories ec ON et.category_id = ec.id + WHERE ec.name ILIKE '%nozzle%' OR ue.orifice_size IS NOT NULL` + ); + console.log('ANY nozzles in database:', anyNozzles.rows); + const result = await pool.query( `SELECT ue.id, ue.custom_name, ue.manufacturer, ue.model, ue.orifice_size, ue.spray_angle, ue.flow_rate_gpm,