Implement owned schedule CRUD and revisions #16

Open
opened 2026-11-07 20:27:03 +00:00 by etashj · 0 comments
Member

Goal

Restore persistent personal schedules in crates/courses-web-api/src/backend/personal.rs. Schedule handlers currently return 501.

Scope

  • Implement GET/POST /api/schedules and PUT/DELETE /api/schedules/{id} using the retained personal SQLite schema.
  • Require verified identity, validate schedule payloads, and include the owner in every read/write predicate.
  • Preserve the revision/history behavior expected by sites/web/src/lib/contracts.ts; use atomic writes and return clear stale-revision errors.
  • Add OpenAPI coverage and tests for create/read/update/delete, persistence after reopening the database, invalid input, and cross-user denial.

Done when

A signed-in user can create, edit, reload, and delete their own schedules through the existing UI without 501 responses; other users cannot access them. Update feature documentation.

See sites/docs/src/backend-development.md and sites/docs/src/api/user.md.

## Goal Restore persistent personal schedules in `crates/courses-web-api/src/backend/personal.rs`. Schedule handlers currently return 501. ## Scope - Implement `GET/POST /api/schedules` and `PUT/DELETE /api/schedules/{id}` using the retained personal SQLite schema. - Require verified identity, validate schedule payloads, and include the owner in every read/write predicate. - Preserve the revision/history behavior expected by `sites/web/src/lib/contracts.ts`; use atomic writes and return clear stale-revision errors. - Add OpenAPI coverage and tests for create/read/update/delete, persistence after reopening the database, invalid input, and cross-user denial. ## Done when A signed-in user can create, edit, reload, and delete their own schedules through the existing UI without 501 responses; other users cannot access them. Update feature documentation. See `sites/docs/src/backend-development.md` and `sites/docs/src/api/user.md`.
Sign in to join this conversation.
No description provided.