aboutsummaryrefslogtreecommitdiff
path: root/profile.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-07-19 15:39:49 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-07-19 15:39:49 +0200
commita84ac778adf57d6446eef6577e617a80d4c6bb8e (patch)
tree5c622349b2784cbe7c3fd7fa901758c2b161b091 /profile.go
parentb41630e941b44a8fffe09f42d9a7efb728fcbfa1 (diff)
downloadguichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.tar.gz
guichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.zip
Ease packaging by making resource path configurable
Diffstat (limited to 'profile.go')
-rw-r--r--profile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile.go b/profile.go
index 603b10a..51f0b08 100644
--- a/profile.go
+++ b/profile.go
@@ -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 {