aboutsummaryrefslogtreecommitdiff
path: root/directory.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 /directory.go
parentb41630e941b44a8fffe09f42d9a7efb728fcbfa1 (diff)
downloadguichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.tar.gz
guichet-a84ac778adf57d6446eef6577e617a80d4c6bb8e.zip
Ease packaging by making resource path configurable
Diffstat (limited to 'directory.go')
-rw-r--r--directory.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/directory.go b/directory.go
index ab5dea3..4f4a5a2 100644
--- a/directory.go
+++ b/directory.go
@@ -13,7 +13,7 @@ const FIELD_NAME_PROFILE_PICTURE = "profilePicture"
const FIELD_NAME_DIRECTORY_VISIBILITY = "directoryVisibility"
func handleDirectory(w http.ResponseWriter, r *http.Request) {
- templateDirectory := template.Must(template.ParseFiles("templates/layout.html", "templates/directory.html"))
+ templateDirectory := template.Must(template.ParseFiles(config.Resources[0]+"/templates/layout.html", config.Resources[0]+"/templates/directory.html"))
login := checkLogin(w, r)
if login == nil {
@@ -37,7 +37,7 @@ type SearchResults struct {
}
func handleDirectorySearch(w http.ResponseWriter, r *http.Request) {
- templateDirectoryResults := template.Must(template.ParseFiles("templates/directory_results.html"))
+ templateDirectoryResults := template.Must(template.ParseFiles(config.Resources[0]+"/templates/directory_results.html"))
//Get input value by user
r.ParseMultipartForm(1024)