ensure homepage has generated time
This commit is contained in:
parent
1e8c664807
commit
b3ceba5ca6
|
@ -52,6 +52,9 @@ func HomeHandler(w http.ResponseWriter, r *http.Request) {
|
|||
t, err := render.GetTemplateFromCache(page)
|
||||
if err != nil {
|
||||
app.Logger.Error(fmt.Sprintf("couldn't get %s from cache", page), "err", err)
|
||||
d.StringMap = map[string]string{
|
||||
"GeneratedAt": time.Now().Format(time.UnixDate),
|
||||
}
|
||||
} else {
|
||||
d.StringMap = map[string]string{
|
||||
"GeneratedAt": t.GeneratedAt.Format(time.UnixDate),
|
||||
|
|
Loading…
Reference in a new issue