aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/server/routes/sync.test.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-12-31 00:53:48 +0900
committernsfisis <nsfisis@gmail.com>2025-12-31 00:53:48 +0900
commitc77da463a60061877cd7ddea1bd7b723b3bf2455 (patch)
tree48227c1a66403a6729213aceb510bd4c699ee494 /src/server/routes/sync.test.ts
parenta6156762ee77bf4bdf7085ff912dd325b45658f0 (diff)
downloadkioku-c77da463a60061877cd7ddea1bd7b723b3bf2455.tar.gz
kioku-c77da463a60061877cd7ddea1bd7b723b3bf2455.tar.zst
kioku-c77da463a60061877cd7ddea1bd7b723b3bf2455.zip
feat(repo): extend CardRepository with note data support
Add noteId and isReversed fields to Card interface for note-based cards. Implement findByIdWithNoteData, findByNoteId, and softDeleteByNoteId methods to support fetching cards with their associated note data and cascading deletions. 🤖 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.test.ts')
-rw-r--r--src/server/routes/sync.test.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/routes/sync.test.ts b/src/server/routes/sync.test.ts
index e1b389f..7492b49 100644
--- a/src/server/routes/sync.test.ts
+++ b/src/server/routes/sync.test.ts
@@ -584,6 +584,8 @@ describe("GET /api/sync/pull", () => {
const mockCard: Card = {
id: "550e8400-e29b-41d4-a716-446655440001",
deckId: "550e8400-e29b-41d4-a716-446655440000",
+ noteId: null,
+ isReversed: null,
front: "Question",
back: "Answer",
state: 2,
@@ -679,6 +681,8 @@ describe("GET /api/sync/pull", () => {
const mockCard: Card = {
id: "550e8400-e29b-41d4-a716-446655440001",
deckId: "550e8400-e29b-41d4-a716-446655440000",
+ noteId: null,
+ isReversed: null,
front: "Q",
back: "A",
state: 0,