aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/server/routes/sync.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-12-31 14:19:22 +0900
committernsfisis <nsfisis@gmail.com>2025-12-31 14:19:22 +0900
commitb074a4901c630ee5c5f7dcff79fa6ff911a14ded (patch)
treea52b738974393e31678c85e37756004d1b547823 /src/server/routes/sync.ts
parent29caaa7aaf14a41dad3d345cd29b319fff6e1305 (diff)
downloadkioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.tar.gz
kioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.tar.zst
kioku-b074a4901c630ee5c5f7dcff79fa6ff911a14ded.zip
feat(schema): make note_id and is_reversed NOT NULL
All cards now require note association - legacy card support removed. This aligns with the note-based card architecture introduced in Phase 8. - Add database migration for NOT NULL constraints - Update client Dexie schema to version 3 - Remove LegacyCardItem component and legacy card handling - Update sync schemas and type definitions - Update all tests to use note-based cards 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/server/routes/sync.ts')
-rw-r--r--src/server/routes/sync.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/routes/sync.ts b/src/server/routes/sync.ts
index f05a7ba..fca099b 100644
--- a/src/server/routes/sync.ts
+++ b/src/server/routes/sync.ts
@@ -26,8 +26,8 @@ const syncDeckSchema = z.object({
const syncCardSchema = z.object({
id: z.uuid(),
deckId: z.uuid(),
- noteId: z.uuid().nullable(),
- isReversed: z.boolean().nullable(),
+ noteId: z.uuid(),
+ isReversed: z.boolean(),
front: z.string().min(1),
back: z.string().min(1),
state: z.number().int().min(0).max(3),