File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,19 @@ func Load() {
101101 ENV .API_TOKENS = apiTokens
102102 }
103103
104- ENV .BLOCKED_ENDPOINTS = utils.GetJson [[]string ](blockedEndpointJSON )
105- ENV .MESSAGE_ALIASES = utils.GetJson [[]middlewares.MessageAlias ](messageAliasesJSON )
104+ if blockedEndpointJSON != "" {
105+ ENV .BLOCKED_ENDPOINTS = utils.GetJson [[]string ](blockedEndpointJSON )
106+ }
107+
108+ if messageAliasesJSON != "" {
109+ ENV .MESSAGE_ALIASES = utils.GetJson [[]middlewares.MessageAlias ](messageAliasesJSON )
110+ }
106111
107- ENV .VARIABLES = utils.GetJson [map [string ]any ](variablesJSON )
108- ENV .VARIABLES ["RECIPIENTS" ] = utils.GetJson [[]string ](recipientsJSON )
112+ if variablesJSON != "" {
113+ ENV .VARIABLES = utils.GetJson [map [string ]any ](variablesJSON )
114+ }
115+
116+ if recipientsJSON != "" {
117+ ENV .VARIABLES ["RECIPIENTS" ] = utils.GetJson [[]string ](recipientsJSON )
118+ }
109119}
You can’t perform that action at this time.
0 commit comments