summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/basic.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/basic.go b/examples/basic.go
index 7f09d0f..d8ad6d7 100644
--- a/examples/basic.go
+++ b/examples/basic.go
@@ -12,7 +12,8 @@ import (
// Big bungus function here!
//
//hh:route GET /org/{orgID}/users
-func adminUsersForm(w http.ResponseWriter, r struct {
+func adminUsersForm(r struct {
+ w http.ResponseWriter
raw *http.Request
search string `hh:"form"`
year int `hh:"optional,form"`
@@ -21,7 +22,7 @@ func adminUsersForm(w http.ResponseWriter, r struct {
banana uuid.UUID `hh:"optional,form"`
nextURL string `hh:"optional,cookie,logout_next_url"`
}) {
- _, _ = w.Write([]byte("ahahaha"))
+ _, _ = r.w.Write([]byte("ahahaha"))
slog.Info("get admin users form", "search", r.search, "offset", r.offset, "next-url", r.nextURL)
}