diff --git a/README.md b/README.md index 2b05612..9d7c52d 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ A story is one JSONB doc: `{ start, nodes: { key: { title, text, ending?, choice Validation (`src/lib/story.ts`): errors block publishing (missing start/targets, dead ends, no reachable ending); warnings are advisory (unreachable scenes, choices on endings). -| Method | Path | | -|--------|------|-| -| GET | `/stories` | published stories (`?mine=1` includes drafts) | -| GET | `/stories/:id` | story + `issues` | -| POST / PUT | `/stories`, `/stories/:id` | create / replace; 400 on bad shape | -| POST | `/stories/:id/publish` | 422 + `issues` if errors | -| POST | `/stories/:id/unpublish` | | -| DELETE | `/stories/:id` | 204 | +| Method | Path | | +| ---------- | -------------------------- | --------------------------------------------- | +| GET | `/stories` | published stories (`?mine=1` includes drafts) | +| GET | `/stories/:id` | story + `issues` | +| POST / PUT | `/stories`, `/stories/:id` | create / replace; 400 on bad shape | +| POST | `/stories/:id/publish` | 422 + `issues` if errors | +| POST | `/stories/:id/unpublish` | | +| DELETE | `/stories/:id` | 204 | No auth (homelab). Without `DATABASE_URL` an in-memory store is used (tests). diff --git a/stories/hansel-and-gretel.json b/stories/hansel-and-gretel.json index 136a2cb..d6d48c0 100644 --- a/stories/hansel-and-gretel.json +++ b/stories/hansel-and-gretel.json @@ -300,4 +300,4 @@ } } } -} \ No newline at end of file +}