Skip to content

Commit 70c58da

Browse files
committed
fix(typecheck): use PlatformLink type in cardService for strict type safety
1 parent 88bee69 commit 70c58da

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/backend/src/services/cardService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import type { PlatformLink } from '@devcard/shared';
12
import type { Prisma } from '@prisma/client';
23
import type { FastifyInstance } from 'fastify';
34

4-
type CardLinkResponse = { platformLink: unknown };
5+
type CardLinkResponse = { platformLink: PlatformLink };
56
type RawCard = { id: string; title: string; isDefault: boolean; cardLinks: CardLinkResponse[] };
6-
type CardResponse = { id: string; title: string; isDefault: boolean; links: unknown[] };
7+
type CardResponse = { id: string; title: string; isDefault: boolean; links: PlatformLink[] };
78

89
function mapCard(card: RawCard): CardResponse {
910
return {

0 commit comments

Comments
 (0)