Complete addition of GET option. Build container.
This commit is contained in:
@@ -23,7 +23,7 @@ func helpTemplate(w http.ResponseWriter, r *http.Request) {
|
||||
BarcodeOptions: barcodeOptions,
|
||||
}
|
||||
|
||||
tmpl, err := template.ParseFiles("templates/base.html", "templates/help.html")
|
||||
tmpl, err := template.ParseFiles("./templates/base.html", "./templates/help.html")
|
||||
if err != nil {
|
||||
fmt.Println("Error parsing templates: ", err)
|
||||
http.Error(w, "Unable to parse templates", 500)
|
||||
|
||||
@@ -15,7 +15,7 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
templatePath := "templates" + path + ".html"
|
||||
if _, err := os.Stat(templatePath); err == nil {
|
||||
tmpl, err := template.ParseFiles("templates/base.html", templatePath)
|
||||
tmpl, err := template.ParseFiles("./templates/base.html", "./"+templatePath)
|
||||
if err != nil {
|
||||
fmt.Println("Error parsing template: ", err)
|
||||
http.Error(w, "Error parsing template", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user