diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index f0341b0..7c1b8e9 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -60,7 +60,7 @@ type UploadHandlers struct { } func NewUploadHandlers(conf *configuration.Configuration, lErr, lUp, lDown *logging.Logger, uploadDirSize *int64) *UploadHandlers { - compileTemplates(path.Join(conf.WebDir, "templates"), lErr) + compileTemplates(lErr) return &UploadHandlers{ conf: conf, @@ -224,7 +224,7 @@ func (h *UploadHandlers) NotFound(w http.ResponseWriter, r *http.Request) { } } -func compileTemplates(dir string, lErr *logging.Logger) { +func compileTemplates(lErr *logging.Logger) { compiledTemplates = make(map[string]*template.Template) t, _ := fs.Sub(templatesDir, "web/templates")