Sprechstunden löschen

This commit is contained in:
Gonne 2022-09-05 20:10:35 +02:00
parent 78af58a51d
commit 2ce7a1fae1
15 changed files with 100 additions and 34 deletions

View file

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