refactor template rendering logic to one base template
This commit is contained in:
parent
16e8cf9cd7
commit
d60b715d96
18 changed files with 199 additions and 212 deletions
|
@ -18,7 +18,7 @@ func (b *BaseHandler) DeleteOfficeHourHandler(w http.ResponseWriter, req *http.R
|
|||
w.WriteHeader(http.StatusBadRequest)
|
||||
}
|
||||
_, err = b.requestRepo.Add(officeHour, models.RequestDelete)
|
||||
Templates.ExecuteTemplate(w, "deleteSuccess.html", struct{}{})
|
||||
b.serveTemplate(w, "deleteSuccess", nil)
|
||||
} else {
|
||||
officeHours, _ := b.officeHourRepo.GetAll(true)
|
||||
timetable, slots := b.GetTimetable(officeHours)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue