finish backend of custom emails

biggest bodge i've ever done but it works i guess.
This commit is contained in:
Harvey Tindall
2021-02-20 00:22:40 +00:00
parent eb406ef951
commit cc4e12c405
7 changed files with 278 additions and 49 deletions
+2 -1
View File
@@ -33,10 +33,11 @@ func (app *appContext) loadConfig() error {
for _, key := range app.config.Section("files").Keys() {
if name := key.Name(); name != "html_templates" && name != "lang_files" {
fmt.Println(name)
key.SetValue(key.MustString(filepath.Join(app.dataPath, (key.Name() + ".json"))))
}
}
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template", "invites", "emails", "user_template"} {
for _, key := range []string{"user_configuration", "user_displayprefs", "user_profiles", "ombi_template", "invites", "emails", "user_template", "custom_emails"} {
app.config.Section("files").Key(key).SetValue(app.config.Section("files").Key(key).MustString(filepath.Join(app.dataPath, (key + ".json"))))
}
app.URLBase = strings.TrimSuffix(app.config.Section("ui").Key("url_base").MustString(""), "/")