Fix duration saying never when it's unlimited
This commit is contained in:
@@ -159,7 +159,7 @@ func (s *Server) adminTokens() []adminToken {
|
||||
out = append(out, adminToken{
|
||||
Name: t.Name,
|
||||
MaxSize: config.FormatSize(l.MaxSize),
|
||||
MaxExpiry: config.FormatDuration(l.MaxExpiry),
|
||||
MaxExpiry: config.FormatLifetime(l.MaxExpiry),
|
||||
Vanity: l.AllowVanity,
|
||||
Admin: l.Admin,
|
||||
})
|
||||
|
||||
@@ -45,7 +45,7 @@ func (s *Server) handleLoginPage(w http.ResponseWriter, r *http.Request) {
|
||||
page: s.page(r, "Log in", false),
|
||||
Next: next,
|
||||
MaxSize: config.FormatSize(lim.MaxSize),
|
||||
MaxExpiry: config.FormatDuration(lim.MaxExpiry),
|
||||
MaxExpiry: config.FormatLifetime(lim.MaxExpiry),
|
||||
Vanity: lim.AllowVanity,
|
||||
})
|
||||
return
|
||||
|
||||
@@ -69,8 +69,8 @@ func (s *Server) handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
s.render(w, http.StatusOK, "index.html", indexPage{
|
||||
page: s.page(r, "Upload", true),
|
||||
MaxSize: config.FormatSize(lim.MaxSize),
|
||||
MaxExpiry: config.FormatDuration(lim.MaxExpiry),
|
||||
DefaultExpiry: config.FormatDuration(lim.DefaultExpiry),
|
||||
MaxExpiry: config.FormatLifetime(lim.MaxExpiry),
|
||||
DefaultExpiry: config.FormatLifetime(lim.DefaultExpiry),
|
||||
AbsBase: s.absBase(r),
|
||||
AllowVanity: lim.AllowVanity,
|
||||
MaxSizeBytes: lim.MaxSize,
|
||||
|
||||
Reference in New Issue
Block a user