1
0

Pass KeepForHours to index template.

This commit is contained in:
Alexander Andreev 2022-02-09 00:48:52 +04:00
parent d6d6c3f461
commit efd83144c4
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -44,6 +44,7 @@ type IndexData struct {
StorageCapStr string StorageCapStr string
StorageUsedStr string StorageUsedStr string
StorageAvailStr string StorageAvailStr string
KeepForHours int
} }
type UploadedData struct { type UploadedData struct {
@ -95,6 +96,7 @@ func (h *UploadHandlers) Index(w http.ResponseWriter, r *http.Request) {
StorageAvailStr: availStr, StorageAvailStr: availStr,
StorageUsed: *h.uploadDirSize, StorageUsed: *h.uploadDirSize,
StorageUsedStr: usedStr, StorageUsedStr: usedStr,
KeepForHours: h.conf.Uploads.Limits.KeepForHours,
}); err != nil { }); err != nil {
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)
h.logErr.Fatalln("failed to execute Index template:", err) h.logErr.Fatalln("failed to execute Index template:", err)