feat: materials by zjazd in the student API and admin

The material admin form gets the "Na zjazd" picker, every student
material JSON carries meeting_id, and GET /materials accepts meeting=
inside the published-only scope, so the Pulpit hero can list the
zjazd's materials next to its readings.
This commit is contained in:
Jakub Zych
2026-10-27 01:44:38 +01:00
parent 3241cc9894
commit ff2f97eb2b
9 changed files with 58 additions and 16 deletions

View File

@@ -204,6 +204,7 @@ type materialListJSON struct {
ID uint `json:"id"`
CourseID *uint `json:"course_id"`
Course *courseRef `json:"course"`
MeetingID *uint `json:"meeting_id"`
Title string `json:"title"`
Type string `json:"type"`
Source *string `json:"source"`
@@ -218,6 +219,7 @@ func newMaterialListJSON(m models.Material, files int64) materialListJSON {
ID: m.ID,
CourseID: m.CourseID,
Course: newCourseRef(m.Course),
MeetingID: m.MeetingID,
Title: m.Title,
Type: m.Type,
Source: m.Source,