From 0b0e7e802fcb50652c3e9912363d996a039d56d8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 7 Dec 2025 18:14:02 +0900 Subject: feat(server): add card CRUD endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implement card management API with create, read, update, and delete operations. Cards are nested under decks (/api/decks/:deckId/cards) with deck ownership verification on all operations. - Add Card interface and CardRepository to repository types - Create cardRepository with CRUD operations and soft delete - Add card routes with Zod validation and auth middleware - Include 29 tests covering all endpoints and error cases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/server/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server/index.ts') diff --git a/src/server/index.ts b/src/server/index.ts index bcedb4e..d00564f 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -2,7 +2,7 @@ import { serve } from "@hono/node-server"; import { Hono } from "hono"; import { logger } from "hono/logger"; import { errorHandler } from "./middleware/index.js"; -import { auth, decks } from "./routes/index.js"; +import { auth, cards, decks } from "./routes/index.js"; const app = new Hono(); @@ -18,7 +18,8 @@ const routes = app return c.json({ status: "ok" }, 200); }) .route("/api/auth", auth) - .route("/api/decks", decks); + .route("/api/decks", decks) + .route("/api/decks/:deckId/cards", cards); export type AppType = typeof routes; -- cgit v1.2.3-70-g09d2