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 <noreply@anthropic.com>
This commit is contained in:
2026-09-03 18:31:25 -05:00
co-authored by Claude Opus 5
parent c12d40dc02
commit 4e7f255782
+1 -1
View File
@@ -182,7 +182,7 @@ router.post('/:id/revoke', asyncRoute(async (req: Request, res: Response) => {
const { rows } = await pool.query<UploadLinkRow>(
`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]
);