1
0

Removed dir arg from compileTemplates().

This commit is contained in:
Alexander Andreev 2022-02-08 18:26:20 +04:00
parent 4b8cc9060e
commit e2b2758b34
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -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")