generated from nholtware/service-template-express
feat: bundle Hansel and Gretel (public domain Grimm retelling)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ef326a015e
commit
0ae3f6109b
2 changed files with 9 additions and 9 deletions
16
README.md
16
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,
|
Validation (`src/lib/story.ts`): errors block publishing (missing start/targets, dead ends,
|
||||||
no reachable ending); warnings are advisory (unreachable scenes, choices on endings).
|
no reachable ending); warnings are advisory (unreachable scenes, choices on endings).
|
||||||
|
|
||||||
| Method | Path | |
|
| Method | Path | |
|
||||||
|--------|------|-|
|
| ---------- | -------------------------- | --------------------------------------------- |
|
||||||
| GET | `/stories` | published stories (`?mine=1` includes drafts) |
|
| GET | `/stories` | published stories (`?mine=1` includes drafts) |
|
||||||
| GET | `/stories/:id` | story + `issues` |
|
| GET | `/stories/:id` | story + `issues` |
|
||||||
| POST / PUT | `/stories`, `/stories/:id` | create / replace; 400 on bad shape |
|
| POST / PUT | `/stories`, `/stories/:id` | create / replace; 400 on bad shape |
|
||||||
| POST | `/stories/:id/publish` | 422 + `issues` if errors |
|
| POST | `/stories/:id/publish` | 422 + `issues` if errors |
|
||||||
| POST | `/stories/:id/unpublish` | |
|
| POST | `/stories/:id/unpublish` | |
|
||||||
| DELETE | `/stories/:id` | 204 |
|
| DELETE | `/stories/:id` | 204 |
|
||||||
|
|
||||||
No auth (homelab). Without `DATABASE_URL` an in-memory store is used (tests).
|
No auth (homelab). Without `DATABASE_URL` an in-memory store is used (tests).
|
||||||
|
|
|
||||||
|
|
@ -300,4 +300,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue