Speichere Konfiguration in config/config.json

This commit is contained in:
Gonne 2022-09-19 14:46:16 +02:00
parent 43b3631da2
commit c38286bcc5
14 changed files with 249 additions and 78 deletions

View file

@ -20,8 +20,8 @@ func (b *BaseHandler) GetByRoomHandler(w http.ResponseWriter, req *http.Request)
return
}
officeHours, _ := b.officeHourRepo.FindByRoom(room, true)
timetable, slots := GetTimetable(officeHours)
b.writeTimetablePage(w, req, printTimetable(timetable, slots, false))
timetable, slots := b.GetTimetable(officeHours)
b.writeTimetablePage(w, req, b.printTimetable(timetable, slots, false))
}
func (b *BaseHandler) GetByCourseHandler(w http.ResponseWriter, req *http.Request) {
@ -35,8 +35,8 @@ func (b *BaseHandler) GetByCourseHandler(w http.ResponseWriter, req *http.Reques
return
}
officeHours, _ := b.officeHourRepo.FindByCourse(course, true)
timetable, slots := GetTimetable(officeHours)
b.writeTimetablePage(w, req, printTimetable(timetable, slots, false))
timetable, slots := b.GetTimetable(officeHours)
b.writeTimetablePage(w, req, b.printTimetable(timetable, slots, false))
}
func (b *BaseHandler) writeTimetablePage(w http.ResponseWriter, req *http.Request, timetable template.HTML) {