diff options
Diffstat (limited to 'courses.go')
-rw-r--r-- | courses.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -47,6 +47,8 @@ type courseT struct { Group string Teacher string Location string + CourseID string + SectionID string Usems sync.Map /* string, *usemT */ } @@ -63,7 +65,7 @@ const staffDepartment = "Staff" func setupCourses(ctx context.Context) error { rows, err := db.Query( ctx, - "SELECT id, nmax, title, ctype, cgroup, teacher, location FROM courses", + "SELECT id, nmax, title, ctype, cgroup, teacher, location, course_id, section_id FROM courses", ) if err != nil { return wrapError(errUnexpectedDBError, err) @@ -89,6 +91,8 @@ func setupCourses(ctx context.Context) error { ¤tCourse.Group, ¤tCourse.Teacher, ¤tCourse.Location, + ¤tCourse.CourseID, + ¤tCourse.SectionID, ) if err != nil { return wrapError(errUnexpectedDBError, err) |