feat: add cellar api
ff852552
Changes:
- apps/cellar/Cargo.toml — tower-http cors feature
- apps/cellar/src/server/handlers/public.rs — api_list_wines,
api_get_wine
- apps/cellar/src/server/mod.rs — sub-router /api/* with CorsLayer
(Any origin,
GET only)
Endpoints:
- GET /api/wines → Vec<Wine> JSON
- GET /api/wines/{short_id} → Wine JSON, 404 if missing
Image bytes still at /wines/{short_id}/image. Run cargo run -p cellar,
hit
endpoints with curl to verify.
4 file(s) · +40 −2