diff options
author | Florian Klink <flokli@flokli.de> | 2019-11-25T16·35+0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-25T16·35+0100 |
commit | 40b2f11543ac78a68d01d4046fc4507da21f1ec9 (patch) | |
tree | 54975ac41af49a6f7124bf9cd48699d2dd8245fb /frontend/frontend.go | |
parent | fecbf8b3e2efd4ba8c2e33159269000db2fbe1da (diff) |
frontend: only pass runner to MakeFrontend, add Runner.GetSubmitQueue()
Diffstat (limited to 'frontend/frontend.go')
-rw-r--r-- | frontend/frontend.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go index 0718bb136d1f..77a792f6440e 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -42,9 +42,11 @@ func loadTemplate(templateName string, funcMap template.FuncMap) (*template.Temp } // MakeFrontend configures the router and returns a new Frontend struct -func MakeFrontend(runner *submitqueue.Runner, submitQueue *submitqueue.SubmitQueue) *Frontend { +func MakeFrontend(runner *submitqueue.Runner) *Frontend { router := gin.Default() + submitQueue := runner.GetSubmitQueue() + funcMap := template.FuncMap{ "isAutoSubmittable": func(serie *submitqueue.Serie) bool { return submitQueue.IsAutoSubmittable(serie) |