You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a0b02c
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(api): centralize AnswerPlatform in packages/api/src/platform.ts
PR #298 review: the 'web' | 'ios' | 'android' platform enum was duplicated
across the answers router, trpc Context typing, and the DB schema comment.
Single source of truth now lives in packages/api/src/platform.ts
(ANSWER_PLATFORMS + AnswerPlatform), re-exported from the package root and
used to type answers.ts's zod schema and trpc.ts's Context.recordAnswer.
Also drops the answer_platform_idx index added in migration
0002_answer_platform.sql: the stats page's per-platform counts are a
full-table GROUP BY, which an index on this low-cardinality (3-4 value)
column wouldn't speed up — only add write overhead. Safe to hand-edit since
this migration hasn't been applied to any real database yet (unmerged,
in-PR).
0 commit comments