Skip to content

Commit fc6738c

Browse files
authored
Merge pull request #44 from Starosdev/fix/upstream-pr-750-notify-url-unmarshal
fix(notify): try to unmarshal notify.urls as JSON array
2 parents 9042676 + 9109fb5 commit fc6738c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

webapp/backend/pkg/notify/notify.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,13 @@ func (n *Notify) Send() error {
234234

235235
//retrieve list of notification endpoints from config file
236236
configUrls := n.Config.GetStringSlice("notify.urls")
237+
configString := n.Config.GetString("notify.urls")
238+
var jsonConfig []string
239+
err := json.Unmarshal([]byte(configString), &jsonConfig)
240+
if err == nil {
241+
configUrls = jsonConfig
242+
}
243+
237244
n.Logger.Debugf("Configured notification services: %v", configUrls)
238245

239246
if len(configUrls) == 0 {

0 commit comments

Comments
 (0)