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