diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-01 23:05:59 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-01 23:25:26 +0100 |
commit | 5eed8fa506bbd24469ec4d42a183928be89a325b (patch) | |
tree | 3ed0e5f514ec1c628bd6c0bbe634d12f5cb8ada4 /profile.go | |
parent | 3c846b6a59c1e725b56b7784c30cfbd5a3dc080b (diff) | |
download | guichet-5eed8fa506bbd24469ec4d42a183928be89a325b.tar.gz guichet-5eed8fa506bbd24469ec4d42a183928be89a325b.zip |
Make repo into a Nix flake
Diffstat (limited to 'profile.go')
-rw-r--r-- | profile.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,7 +1,6 @@ package main import ( - "html/template" "net/http" "strings" @@ -22,7 +21,7 @@ type ProfileTplData struct { } func handleProfile(w http.ResponseWriter, r *http.Request) { - templateProfile := template.Must(template.ParseFiles("templates/layout.html", "templates/profile.html")) + templateProfile := getTemplate("profile.html") login := checkLogin(w, r) if login == nil { @@ -97,7 +96,7 @@ type PasswdTplData struct { } func handlePasswd(w http.ResponseWriter, r *http.Request) { - templatePasswd := template.Must(template.ParseFiles("templates/layout.html", "templates/passwd.html")) + templatePasswd := getTemplate("passwd.html") login := checkLogin(w, r) if login == nil { |