aboutsummaryrefslogtreecommitdiff
path: root/pim_http.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-02-12 19:52:19 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-02-12 19:52:19 +0100
commitaff7efd726cfedd66f1d60a7104657d5154e1d3c (patch)
tree686a9179838b8c4f590c253986d9a6667d41cc98 /pim_http.go
parent1a9d750de7bb30bea5dcc7cd14f3f1826ddf00f7 (diff)
downloadguichet-feat/aerogramme.tar.gz
guichet-feat/aerogramme.zip
Improve inspect pagefeat/aerogramme
Diffstat (limited to 'pim_http.go')
-rw-r--r--pim_http.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/pim_http.go b/pim_http.go
index e04c702..93c6ad6 100644
--- a/pim_http.go
+++ b/pim_http.go
@@ -6,6 +6,11 @@ import (
"net/http"
)
+type PimInspectView struct {
+ User *LoggedUser
+ Debug string
+}
+
func handlePimInspect(w http.ResponseWriter, r *http.Request) {
user := RequireUserHtml(w, r)
if user == nil {
@@ -24,8 +29,13 @@ func handlePimInspect(w http.ResponseWriter, r *http.Request) {
return
}
+ view := PimInspectView {
+ User: user,
+ Debug: string(pim_json),
+ }
+
tKey := getTemplate("pim_inspect.html")
- tKey.Execute(w, string(pim_json))
+ tKey.Execute(w, view)
}
func handlePimSetup(w http.ResponseWriter, r *http.Request) {