diff options
author | Matthew Lemon <y@yulqen.org> | 2024-02-12 13:57:52 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-02-12 13:57:52 +0000 |
commit | 752ee52dcd487253bc1662b1ba157732f73d27cf (patch) | |
tree | a2c3c3d36177fc9ba90fcc1d85798ba943268579 /cmd/web/handlers.go | |
parent | c1c0ddbf61860b863f1e3ac11caea7407eef2412 (diff) |
wip: mating EPs with Operations
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", |