I don't know why I discarded that when I could've used it

This commit is contained in:
Lilian Jónsdóttir 2024-01-23 13:49:59 -08:00
parent e3253e6434
commit 6b1205e4f3

View file

@ -40,9 +40,9 @@ func Initialise(a *config.AppConfig) {
// time the related template was generated
func makeBasicTemplateData(name string) models.TemplateData {
var strMap map[string]string
if _, ok := app.TemplateCache.Cache[name]; ok {
if cacheItem, ok := app.TemplateCache.Cache[name]; ok {
strMap = map[string]string{
"GeneratedAt": app.TemplateCache.Cache[name].GeneratedAt.Format(time.UnixDate),
"GeneratedAt": cacheItem.GeneratedAt.Format(time.UnixDate),
}
} else {
strMap = make(map[string]string)