diff options
author | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-19 12:07:41 -0300 |
---|---|---|
committer | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-19 12:07:41 -0300 |
commit | afa9e221d07ac0e246daadef33e911bc86fd74eb (patch) | |
tree | 5cde22106d5774e45efcc9415cae206266365fa0 /main.go | |
parent | 6f8744c1ad53b4056dc6245f8ac6b5fb903aef8f (diff) |
hack fix mod pages
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -24,6 +24,7 @@ import ( "strconv" "strings" "time" + "log" ) var Port = ":" + GetConfigValue("instanceport", "3000") @@ -630,7 +631,13 @@ func main() { adminData.AutoSubscribe = GetActorAutoSubscribeDB(db, actor.Id) - t.ExecuteTemplate(w, "layout", adminData) + adminData.Themes = &Themes; + + err := t.ExecuteTemplate(w, "layout", adminData) + if err != nil { + // TODO: actual error handling + log.Printf("mod page: %s\n", err) + } } else if admin || actor.Id == Domain { t := template.Must(template.New("").Funcs(template.FuncMap{ @@ -665,7 +672,13 @@ func main() { adminData.PostBlacklist = GetRegexBlacklistDB(db) - t.ExecuteTemplate(w, "layout", adminData) + adminData.Themes = &Themes + + err := t.ExecuteTemplate(w, "layout", adminData) + if err != nil { + // TODO: actual error handling + log.Printf("mod page: %s\n", err) + } } }) |