feat: private checklists for zjazd preparation

Per-user checklists with items that may link a course, reading, deadline,
material or own presentation deck. An item with a reading shares the
reading's read mark. Student API routes with token twins, MCP tools,
migrations, tests and README.
This commit is contained in:
Jakub Zych
2026-10-30 12:41:04 +01:00
parent 643f8cbf7c
commit d7cd5baedf
15 changed files with 1262 additions and 21 deletions

View File

@@ -76,11 +76,11 @@ func TestPluginActivates(t *testing.T) {
if p.ID() != "jz.bm" || !slices.Equal(p.Requires(), []string{"golem15.user"}) {
t.Errorf("ID %q Requires %v", p.ID(), p.Requires())
}
if n := len(p.Models()); n != 11 {
t.Errorf("Models = %d, want 11", n)
if n := len(p.Models()); n != 13 {
t.Errorf("Models = %d, want 13", n)
}
if n := len(p.Migrations()); n != 16 {
t.Errorf("Migrations = %d, want 16", n)
if n := len(p.Migrations()); n != 18 {
t.Errorf("Migrations = %d, want 18", n)
}
if !slices.ContainsFunc(p.Commands(), func(c bonfire.Command) bool { return c.Name == "bm:seed" }) {
t.Error("bm:seed is not registered")
@@ -117,6 +117,16 @@ func TestRoutes(t *testing.T) {
"DELETE /_bm/api/v1/readings/{id}/owned",
"GET /_bm/api/v1/materials",
"GET /_bm/api/v1/materials/{id}",
"GET /_bm/api/v1/checklists",
"POST /_bm/api/v1/checklists",
"GET /_bm/api/v1/checklists/{id}",
"PATCH /_bm/api/v1/checklists/{id}",
"DELETE /_bm/api/v1/checklists/{id}",
"POST /_bm/api/v1/checklists/{id}/items",
"PATCH /_bm/api/v1/checklist-items/{id}",
"DELETE /_bm/api/v1/checklist-items/{id}",
"PUT /_bm/api/v1/checklist-items/{id}/done",
"DELETE /_bm/api/v1/checklist-items/{id}/done",
"GET /_bm/api/v1/calendar-feed",
"PUT /_bm/api/v1/calendar-feed",
"POST /_bm/api/v1/calendar-feed/rotate",
@@ -134,6 +144,16 @@ func TestRoutes(t *testing.T) {
"DELETE /_bm/api/v1/token/readings/{id}/owned",
"GET /_bm/api/v1/token/materials",
"GET /_bm/api/v1/token/materials/{id}",
"GET /_bm/api/v1/token/checklists",
"POST /_bm/api/v1/token/checklists",
"GET /_bm/api/v1/token/checklists/{id}",
"PATCH /_bm/api/v1/token/checklists/{id}",
"DELETE /_bm/api/v1/token/checklists/{id}",
"POST /_bm/api/v1/token/checklists/{id}/items",
"PATCH /_bm/api/v1/token/checklist-items/{id}",
"DELETE /_bm/api/v1/token/checklist-items/{id}",
"PUT /_bm/api/v1/token/checklist-items/{id}/done",
"DELETE /_bm/api/v1/token/checklist-items/{id}/done",
"GET /api/v1/bm/me",
"GET /api/v1/bm/materials",
"GET /api/v1/bm/materials/{id}",