about summary refs log tree commit diff
path: root/src/bot.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/bot.go')
-rw-r--r--src/bot.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bot.go b/src/bot.go
index 1a0d342..7613180 100644
--- a/src/bot.go
+++ b/src/bot.go
@@ -384,7 +384,7 @@ func botsHandler(w http.ResponseWriter, r *http.Request) {
 		data["bots"] = bots
 
 		// get the template
-		t, err := template.ParseGlob("./templates/*.html")
+		t, err := template.ParseGlob(fmt.Sprintf("%s/*.html", templatesPath))
 		if err != nil {
 			w.WriteHeader(http.StatusInternalServerError)
 			w.Write([]byte("500 - Error reading template file"))
@@ -521,7 +521,7 @@ func botSingleHandler(w http.ResponseWriter, r *http.Request) {
 		}
 
 		// get the template
-		t, err := template.ParseGlob("./templates/*.html")
+		t, err := template.ParseGlob(fmt.Sprintf("%s/*.html", templatesPath))
 		if err != nil {
 			w.WriteHeader(http.StatusInternalServerError)
 			w.Write([]byte("500 - Error reading template file"))
@@ -706,7 +706,7 @@ func botNewHandler(w http.ResponseWriter, r *http.Request) {
 		}
 
 		// get the template
-		t, err := template.ParseGlob("./templates/*.html")
+		t, err := template.ParseGlob(fmt.Sprintf("%s/*.html", templatesPath))
 		if err != nil {
 			w.WriteHeader(http.StatusInternalServerError)
 			w.Write([]byte("500 - Error reading template file"))