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:
parent
df238864f2
commit
4cea84ebab
|
|
@ -201,9 +201,9 @@ async function handleWebhook(req, res) {
|
||||||
// Update application payment status
|
// Update application payment status
|
||||||
await pool.query(
|
await pool.query(
|
||||||
`UPDATE applications
|
`UPDATE applications
|
||||||
SET payment_status = $1,
|
SET payment_status = $1::varchar,
|
||||||
payment_paid_at = CASE WHEN $1 = 'paid' THEN CURRENT_TIMESTAMP ELSE payment_paid_at END
|
payment_paid_at = CASE WHEN $1::varchar = 'paid' THEN CURRENT_TIMESTAMP ELSE payment_paid_at END
|
||||||
WHERE mollie_payment_id = $2`,
|
WHERE mollie_payment_id = $2::varchar`,
|
||||||
[paymentStatus, paymentId]
|
[paymentStatus, paymentId]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue