fix: cast webhook SQL params to varchar for PostgreSQL type resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-23 21:06:25 -08:00
parent df238864f2
commit 4cea84ebab
1 changed files with 3 additions and 3 deletions

View File

@ -201,9 +201,9 @@ async function handleWebhook(req, res) {
// Update application payment status
await pool.query(
`UPDATE applications
SET payment_status = $1,
payment_paid_at = CASE WHEN $1 = 'paid' THEN CURRENT_TIMESTAMP ELSE payment_paid_at END
WHERE mollie_payment_id = $2`,
SET payment_status = $1::varchar,
payment_paid_at = CASE WHEN $1::varchar = 'paid' THEN CURRENT_TIMESTAMP ELSE payment_paid_at END
WHERE mollie_payment_id = $2::varchar`,
[paymentStatus, paymentId]
);