feat: the author edits a material in the app
- PUT /_bm/api/v1/materials/{id} (jwt.auth only, no token twin): every
key of the edit body required, revision checked on the row locked FOR
UPDATE, 409 with the student detail of the server version
- editableMaterialForCaller: 404 for what the caller cannot see, 403 for
what they see but may not manage
- tags from the dictionary only (at most 4), http(s) urls, the body
normalised as bm-notatka push does; course, author and publication kept
- loadMaterialDetail shared by GET /materials/{id} and the edit answers
This commit is contained in:
@@ -52,6 +52,7 @@ func handlers(h *api.Handlers) map[string]http.HandlerFunc {
|
||||
"materials": h.Materials,
|
||||
"material": h.Material,
|
||||
"mat-access": h.MaterialAccess,
|
||||
"mat-edit": h.EditMaterial,
|
||||
"feed": h.CalendarFeed,
|
||||
"feed-put": h.UpdateCalendarFeed,
|
||||
"rotate": h.RotateCalendarFeed,
|
||||
|
||||
Reference in New Issue
Block a user