From e4f233e2e577a5e2bfd95519c17c0abe87089feb Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sat, 1 Aug 2020 16:53:29 +0530 Subject: [PATCH] Add missing `root_url` to settings UI --- frontend/src/views/Settings.vue | 6 ++++++ init.go | 4 ++-- schema.sql | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index bbea567..0416212 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -18,6 +18,12 @@
+ + + + diff --git a/init.go b/init.go index 68233b4..a69bc3a 100644 --- a/init.go +++ b/init.go @@ -37,7 +37,7 @@ const ( // constants contains static, constant config values required by the app. type constants struct { - RootURL string `koanf:"root"` + RootURL string `koanf:"root_url"` LogoURL string `koanf:"logo_url"` FaviconURL string `koanf:"favicon_url"` FromEmail string `koanf:"from_email"` @@ -347,7 +347,7 @@ func initMediaStore() media.Store { var o filesystem.Opts ko.Unmarshal("upload.filesystem", &o) - o.RootURL = ko.String("app.root") + o.RootURL = ko.String("app.root_url") o.UploadPath = filepath.Clean(o.UploadPath) o.UploadURI = filepath.Clean(o.UploadURI) up, err := filesystem.NewDiskStore(o) diff --git a/schema.sql b/schema.sql index 01934bf..a6f4779 100644 --- a/schema.sql +++ b/schema.sql @@ -165,6 +165,7 @@ CREATE TABLE settings ( ); DROP INDEX IF EXISTS idx_settings_key; CREATE INDEX idx_settings_key ON settings(key); INSERT INTO settings (key, value) VALUES + ('app.root_url', '"https://localhost:9000"'), ('app.favicon_url', '""'), ('app.from_email', '"listmonk "'), ('app.logo_url', '"http://localhost:9000/public/static/logo.png"'),