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)
|
t, err := render.GetTemplateFromCache(page)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.Logger.Error(fmt.Sprintf("couldn't get %s from cache", page), "err", err)
|
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 {
|
} else {
|
||||||
d.StringMap = map[string]string{
|
d.StringMap = map[string]string{
|
||||||
"GeneratedAt": t.GeneratedAt.Format(time.UnixDate),
|
"GeneratedAt": t.GeneratedAt.Format(time.UnixDate),
|
||||||
|
|
Loading…
Reference in a new issue