diff options
Diffstat (limited to '')
-rw-r--r-- | endpoint_index.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/endpoint_index.go b/endpoint_index.go index a6aa441..e5c35ca 100644 --- a/endpoint_index.go +++ b/endpoint_index.go @@ -128,6 +128,14 @@ func handleIndex(w http.ResponseWriter, req *http.Request) { } return } + sportRequired, err := getCourseTypeMinimumForYearGroup(department, sport) + if err != nil { + wstr(w, http.StatusInternalServerError, "Failed to get sport requirement") + } + nonSportRequired, err := getCourseTypeMinimumForYearGroup(department, nonSport) + if err != nil { + wstr(w, http.StatusInternalServerError, "Failed to get non-sport requirement") + } err = tmpl.ExecuteTemplate( w, @@ -136,10 +144,15 @@ func handleIndex(w http.ResponseWriter, req *http.Request) { Name string Department string Groups *map[string]groupT + Required struct { + Sport int + NonSport int + } }{ username, department, &_groups, + struct{Sport int; NonSport int}{sportRequired, nonSportRequired}, }, ) if err != nil { |