diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-07-19 15:39:49 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-07-19 15:39:49 +0200 |
commit | a84ac778adf57d6446eef6577e617a80d4c6bb8e (patch) | |
tree | 5c622349b2784cbe7c3fd7fa901758c2b161b091 /profile.go | |
parent | b41630e941b44a8fffe09f42d9a7efb728fcbfa1 (diff) | |
download | guichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.tar.gz guichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.zip |
Ease packaging by making resource path configurable
Diffstat (limited to 'profile.go')
-rw-r--r-- | profile.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ type ProfileTplData struct { } func handleProfile(w http.ResponseWriter, r *http.Request) { - templateProfile := template.Must(template.ParseFiles("templates/layout.html", "templates/profile.html")) + templateProfile := template.Must(template.ParseFiles(config.Resources[0]+"/templates/layout.html", config.Resources[0]+"/templates/profile.html")) login := checkLogin(w, r) if login == nil { @@ -97,7 +97,7 @@ type PasswdTplData struct { } func handlePasswd(w http.ResponseWriter, r *http.Request) { - templatePasswd := template.Must(template.ParseFiles("templates/layout.html", "templates/passwd.html")) + templatePasswd := template.Must(template.ParseFiles(config.Resources[0]+"/templates/layout.html", config.Resources[0]+"/templates/passwd.html")) login := checkLogin(w, r) if login == nil { |