From 4e7f2557829ce43a20aae4251e58d40f43cf1b43 Mon Sep 17 00:00:00 2001 From: Thom Lamb Date: Thu, 3 Sep 2026 18:31:25 -0500 Subject: [PATCH] fix(admin): return contact_email from the revoke query (#260) The revoke route's RETURNING clause omitted contact_email while its result was typed as UploadLinkRow, which declares the field as present. No user-visible effect since the response was never checked for it, but the type asserted something the query did not actually return. Added the column so the two agree. Co-Authored-By: Claude Opus 5 --- backend/src/routes/adminUploadLinks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/routes/adminUploadLinks.ts b/backend/src/routes/adminUploadLinks.ts index d1f5b7c..72ef918 100644 --- a/backend/src/routes/adminUploadLinks.ts +++ b/backend/src/routes/adminUploadLinks.ts @@ -182,7 +182,7 @@ router.post('/:id/revoke', asyncRoute(async (req: Request, res: Response) => { const { rows } = await pool.query( `UPDATE upload_links SET revoked_at = COALESCE(revoked_at, now()) WHERE id = $1 - RETURNING id, label, revoked_at, submission_count, max_submissions, last_used_at, created_at`, + RETURNING id, label, contact_email, revoked_at, submission_count, max_submissions, last_used_at, created_at`, [req.params.id] );