fixing switch from household to rescue
This commit is contained in:
@@ -198,12 +198,12 @@ export const updateWorkspace = async ({
|
||||
const result = await db.query<WorkspaceRow>(
|
||||
`UPDATE workspaces
|
||||
SET name = $2,
|
||||
workspace_type = $3,
|
||||
workspace_type = $3::varchar,
|
||||
billing_email = $4,
|
||||
billing_plan = $5,
|
||||
billing_plan = $5::varchar,
|
||||
rescue_verification_status = CASE
|
||||
WHEN $3 = 'rescue' AND rescue_verification_status = 'not_required' THEN 'pending'
|
||||
WHEN $3 = 'standard' THEN 'not_required'
|
||||
WHEN $3::varchar = 'rescue' AND rescue_verification_status = 'not_required' THEN 'pending'
|
||||
WHEN $3::varchar = 'standard' THEN 'not_required'
|
||||
ELSE rescue_verification_status
|
||||
END,
|
||||
updated_at = CURRENT_TIMESTAMP
|
||||
|
||||
Reference in New Issue
Block a user