summaryrefslogtreecommitdiffstats
path: root/cmd/web/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cmd/web/handlers.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go
index b0e83ac..78d4029 100644
--- a/cmd/web/handlers.go
+++ b/cmd/web/handlers.go
@@ -10,6 +10,19 @@ import (
"github.com/yulqen/ded-go-core/internal/models"
)
+func (app *application) listOperations(w http.ResponseWriter, r *http.Request) {
+
+ ops, err := app.operations.ListAll()
+ if err != nil {
+ app.serverError(w, r, err)
+ return
+ }
+
+ for _, op := range ops {
+ fmt.Fprintf(w, "%+v\n", op)
+ }
+}
+
func (app *application) listOrganisation(w http.ResponseWriter, r *http.Request) {
files := []string{
"./ui/html/base.tmpl.html",