summaryrefslogtreecommitdiffstats
path: root/services/webhook/webhook.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/webhook/webhook.go')
-rw-r--r--services/webhook/webhook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go
index 68cfe147aa..767c3701f3 100644
--- a/services/webhook/webhook.go
+++ b/services/webhook/webhook.go
@@ -70,7 +70,7 @@ var webhooks = map[webhook_model.HookType]*webhook{
// RegisterWebhook registers a webhook
func RegisterWebhook(name string, webhook *webhook) {
- webhooks[webhook_model.HookType(name)] = webhook
+ webhooks[name] = webhook
}
// IsValidHookTaskType returns true if a webhook registered
@@ -78,7 +78,7 @@ func IsValidHookTaskType(name string) bool {
if name == webhook_model.GITEA || name == webhook_model.GOGS {
return true
}
- _, ok := webhooks[webhook_model.HookType(name)]
+ _, ok := webhooks[name]
return ok
}