diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-12-31 01:18:37 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-12-31 01:20:00 +0900 |
| commit | ef65c4e6d31b5df36bfff3254d614f61bf659bed (patch) | |
| tree | 4cfab0983a1aa3f58c1b90c1a8bc17fa37c4049e /src/server/routes/study.ts | |
| parent | 139dd1a9ec77921ad757ec6bb9b2b97f9b1162c4 (diff) | |
| download | kioku-ef65c4e6d31b5df36bfff3254d614f61bf659bed.tar.gz kioku-ef65c4e6d31b5df36bfff3254d614f61bf659bed.tar.zst kioku-ef65c4e6d31b5df36bfff3254d614f61bf659bed.zip | |
feat(api): include note data in Card and Study route responses
Update Card GET endpoint to return note and field values when available,
and Study GET endpoint to include note data for card display rendering.
This enables the frontend to render note-based cards with their templates.
🤖 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/study.ts')
| -rw-r--r-- | src/server/routes/study.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/routes/study.ts b/src/server/routes/study.ts index 26e949a..ccb0692 100644 --- a/src/server/routes/study.ts +++ b/src/server/routes/study.ts @@ -51,7 +51,11 @@ export function createStudyRouter(deps: StudyDependencies) { } const now = new Date(); - const dueCards = await cardRepo.findDueCards(deckId, now, 100); + const dueCards = await cardRepo.findDueCardsWithNoteData( + deckId, + now, + 100, + ); return c.json({ cards: dueCards }, 200); }) |
