1
0

Omitted unused variable. Fixed copy-paste error with using uploaded template instead of nospace.

This commit is contained in:
Alexander Andreev 2022-03-06 22:34:34 +04:00
parent fe3883de83
commit 980dce8023
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -73,7 +73,7 @@ func NewUploadHandlers(conf *configuration.Configuration, lErr, lUp, lDown *logg
uploadDirSize: uploadDirSize}
}
func (h *UploadHandlers) AssetsFS() http.FileSystem {
func (*UploadHandlers) AssetsFS() http.FileSystem {
f, _ := fs.Sub(assetsDir, "web/assets")
return http.FS(f)
}
@ -131,7 +131,7 @@ func (h *UploadHandlers) Upload(w http.ResponseWriter, r *http.Request) {
if leftSpace < fHandler.Size {
h.logErr.Println("not enough space left in storage, only", leftSpace>>20, "MiB left")
w.WriteHeader(http.StatusInternalServerError)
if err := compiledTemplates["uploaded"].Execute(w, &NotFoundData{
if err := compiledTemplates["nospace"].Execute(w, &NotFoundData{
MainSite: utils.MainSite(r.Host),
}); err != nil {
w.WriteHeader(http.StatusInternalServerError)