mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
[CLD-7373] Always overwrite CloudSettings based on service environment when in production (#26581)
* Always overwrite CloudSettings based on service environment * Only override the CWSURL, leave CWSAPIURL * Update to allow tests to pass * Undo unintentional changes
This commit is contained in:
parent
00d48b04ed
commit
408608d494
1 changed files with 5 additions and 3 deletions
|
|
@ -3015,16 +3015,18 @@ type CloudSettings struct {
|
|||
}
|
||||
|
||||
func (s *CloudSettings) SetDefaults() {
|
||||
if s.CWSURL == nil {
|
||||
switch GetServiceEnvironment() {
|
||||
serviceEnvironment := GetServiceEnvironment()
|
||||
if s.CWSURL == nil || serviceEnvironment == ServiceEnvironmentProduction {
|
||||
switch serviceEnvironment {
|
||||
case ServiceEnvironmentProduction:
|
||||
s.CWSURL = NewString(CloudSettingsDefaultCwsURL)
|
||||
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
||||
s.CWSURL = NewString(CloudSettingsDefaultCwsURLTest)
|
||||
}
|
||||
}
|
||||
|
||||
if s.CWSAPIURL == nil {
|
||||
switch GetServiceEnvironment() {
|
||||
switch serviceEnvironment {
|
||||
case ServiceEnvironmentProduction:
|
||||
s.CWSAPIURL = NewString(CloudSettingsDefaultCwsAPIURL)
|
||||
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
||||
|
|
|
|||
Loading…
Reference in a new issue