Files
server/util/util.go
T

15 lines
353 B
Go

package util
import "git.ohea.xyz/cursorius/server/config"
// Generated map for webhook handler config
func CreateWebhookConfig(conf map[string]config.Job) map[string]config.Webhook {
webhookConfig := make(map[string]config.Webhook, 0)
for k, v := range conf {
if v.Webhook != nil {
webhookConfig[k] = *v.Webhook
}
}
return webhookConfig
}