diff options
Diffstat (limited to 'cmd/web/handlers.go')
-rw-r--r-- | cmd/web/handlers.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index e27b39b..0a7be55 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -13,11 +13,22 @@ import ( func (app *application) listOperations(w http.ResponseWriter, r *http.Request) { ops, err := app.operations.ListAll() - if err != nil { app.serverError(w, r, err) return } + + var esses []models.EngagementStrategy + + for _, op := range ops { + es, err := app.engagement_strategies.GetForOperation(op.ID) + // TODO: Check what kind of error this is, don't just continue + if err != nil { + continue + } + esses = append(esses, es) + } + files := []string{ "./ui/html/base.tmpl.html", "./ui/html/pages/operations/list.tmpl.html", |