diff --git a/LabWiseLogos.png b/LabWiseLogos.png new file mode 100644 index 0000000..4fda909 Binary files /dev/null and b/LabWiseLogos.png differ diff --git a/server/src/routes/chemicals.ts b/server/src/routes/chemicals.ts index f3c9c5d..8f45a34 100644 --- a/server/src/routes/chemicals.ts +++ b/server/src/routes/chemicals.ts @@ -40,7 +40,7 @@ router.post('/', async (req, res) => { ) VALUES ( $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12, $13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25 - ) RETURNING *`, + ) RETURNING *, percentage_full::float AS percentage_full, expiration_date::text AS expiration_date`, [ req.user!.id, b.piFirstName, b.physicalState, b.chemicalName, b.bldgCode, b.lab, b.storageLocation, b.storageDevice, b.numberOfContainers, b.amountPerContainer, @@ -72,7 +72,8 @@ router.patch('/:id', async (req, res) => { const result = await pool.query( `UPDATE chemicals SET ${setClauses}, updated_at = NOW() - WHERE id = $1 AND user_id = $2 RETURNING *`, + WHERE id = $1 AND user_id = $2 + RETURNING *, percentage_full::float AS percentage_full, expiration_date::text AS expiration_date`, [req.params.id, req.user!.id, ...values] ); if (result.rows.length === 0) return res.status(404).json({ error: 'Not found' });