From e2b2758b34e54dce7c682faad7283161907dde80 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 8 Feb 2022 18:26:20 +0400 Subject: [PATCH] Removed dir arg from compileTemplates(). --- internal/handlers/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")