Bug Description
The backend typecheck (tsc --noEmit) fails consistently with the following error:
src/routes/cards.ts: error TS2741: Property 'links' is missing in type
'{ id: string; createdAt: Date; updatedAt: Date; userId: string; title: string;
description: string | null; slug: string; visibility: CardVisibility;
qrEnabled: boolean; viewCount: number; isDefault: boolean; }'
but required in type 'CardResponse'.
Location
apps/backend/src/routes/cards.ts — PUT /:id (updateCard route)
The handler return type is declared as Promise<CardResponse>, but
cardService.updateCard() returns an object that does not include the
links field required by CardResponse.
How to Reproduce
- Checkout
main branch (clean, no local changes)
- Run
npm --prefix apps/backend run typecheck
- Error appears immediately
Evidence of Pre-existing Nature
This error has surfaced in at least two separate PRs (#626, #632) on
completely unrelated changes — confirming it exists on main independent
of either PR's diff.
Likely Fix
cardService.updateCard() in cardService.ts needs to either:
- Include
links in its Prisma query (include: { links: true })
- Or update the
CardResponse type to make links optional if it's not
always needed
Impact
Blocks backend-ci typecheck step for any PR targeting main that
touches backend files.
Bug Description
The backend typecheck (
tsc --noEmit) fails consistently with the following error:src/routes/cards.ts: error TS2741: Property 'links' is missing in type
'{ id: string; createdAt: Date; updatedAt: Date; userId: string; title: string;
description: string | null; slug: string; visibility: CardVisibility;
qrEnabled: boolean; viewCount: number; isDefault: boolean; }'
but required in type 'CardResponse'.
Location
apps/backend/src/routes/cards.ts— PUT/:id(updateCard route)The handler return type is declared as
Promise<CardResponse>, butcardService.updateCard()returns an object that does not include thelinksfield required byCardResponse.How to Reproduce
mainbranch (clean, no local changes)npm --prefix apps/backend run typecheckEvidence of Pre-existing Nature
This error has surfaced in at least two separate PRs (#626, #632) on
completely unrelated changes — confirming it exists on
mainindependentof either PR's diff.
Likely Fix
cardService.updateCard()incardService.tsneeds to either:linksin its Prisma query (include: { links: true })CardResponsetype to makelinksoptional if it's notalways needed
Impact
Blocks
backend-citypecheck step for any PR targetingmainthattouches backend files.