refactor: drop the quiz import and the golem15.quizzes dependency

golem15.quizzes now serves its own import at /api/v1/quizzes/import behind
the same shared API token.
This commit is contained in:
Jakub Zych
2026-10-04 23:15:01 +02:00
parent 97000dcd1e
commit 840935d22d
6 changed files with 7 additions and 52 deletions

View File

@@ -91,7 +91,7 @@ func (p *Plugin) Routes(r pact.Router) error {
g.Post("/calendar-feed/rotate", h.RotateCalendarFeed, "throttle:10,1")
g.Delete("/calendar-feed", h.DeleteCalendarFeed)
})
// The management API: what bm:seed and quizzes:import do, plus materials,
// The management API: what bm:seed does, plus materials,
// behind the application-wide user API token. Scope limits delegation;
// user.permission checks the owner's current group permissions.
r.Group(ManagePrefix, surf.Use(bucketManage, "user.api_token"), func(g pact.Router) {
@@ -105,7 +105,6 @@ func (p *Plugin) Routes(r pact.Router) error {
"user.permission:"+controllers.PermCourses,
"user.permission:"+controllers.PermSchedule,
"user.permission:"+controllers.PermMaterials)
g.Post("/quizzes", h.ImportQuiz, "user.scope:write", "user.permission:golem15.quizzes.access_quizzes")
})
// The calendar feed: public, because calendar clients fetch it without
// credentials; the token in the path is the credential. ServeMux cannot