diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-11-24 11:57:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 11:57:39 +0000 |
commit | c9419e51afeb0c8cb39a43bd8a0d0d472347a8a1 (patch) | |
tree | 7b425f81fe82f73c80857799a35d0ad6a004db4a /setup/config/config_syncapi.go | |
parent | ec716793eb86e7723ecfaa356e148334bc3921eb (diff) |
Don't populate config defaults where it doesn't make sense (#2058)
* Don't populate config defaults where it doesn't make sense
* Fix dendritejs builds
Diffstat (limited to 'setup/config/config_syncapi.go')
-rw-r--r-- | setup/config/config_syncapi.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/setup/config/config_syncapi.go b/setup/config/config_syncapi.go index 4b9bfb16..dc813cb7 100644 --- a/setup/config/config_syncapi.go +++ b/setup/config/config_syncapi.go @@ -11,12 +11,14 @@ type SyncAPI struct { RealIPHeader string `yaml:"real_ip_header"` } -func (c *SyncAPI) Defaults() { +func (c *SyncAPI) Defaults(generate bool) { c.InternalAPI.Listen = "http://localhost:7773" c.InternalAPI.Connect = "http://localhost:7773" c.ExternalAPI.Listen = "http://localhost:8073" c.Database.Defaults(10) - c.Database.ConnectionString = "file:syncapi.db" + if generate { + c.Database.ConnectionString = "file:syncapi.db" + } } func (c *SyncAPI) Verify(configErrs *ConfigErrors, isMonolith bool) { |