feat(api): Add stage field to dispensary PUT endpoint

Allows updating dispensary stage via API for better data management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-13 13:37:47 -07:00
parent 8b3ae40089
commit e9a688fbb3

View File

@@ -321,6 +321,7 @@ router.put('/:id', async (req, res) => {
status, status,
country, country,
slug, slug,
stage,
} = req.body; } = req.body;
// Validate menu_type if provided // Validate menu_type if provided
@@ -364,8 +365,9 @@ router.put('/:id', async (req, res) => {
status = COALESCE($29, status), status = COALESCE($29, status),
country = COALESCE($30, country), country = COALESCE($30, country),
slug = COALESCE($31, slug), slug = COALESCE($31, slug),
stage = COALESCE($32, stage),
updated_at = CURRENT_TIMESTAMP updated_at = CURRENT_TIMESTAMP
WHERE id = $32 WHERE id = $33
RETURNING * RETURNING *
`, [ `, [
name, name,
@@ -399,6 +401,7 @@ router.put('/:id', async (req, res) => {
status, status,
country, country,
slug, slug,
stage,
id id
]); ]);