aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin/hooks.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/admin/hooks.go')
-rw-r--r--routers/api/v1/admin/hooks.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/admin/hooks.go b/routers/api/v1/admin/hooks.go
index fb1ea4eab6..a687541be5 100644
--- a/routers/api/v1/admin/hooks.go
+++ b/routers/api/v1/admin/hooks.go
@@ -51,9 +51,10 @@ func ListHooks(ctx *context.APIContext) {
// for compatibility the default value is true
isSystemWebhook := optional.Some(true)
typeValue := ctx.FormString("type")
- if typeValue == "default" {
+ switch typeValue {
+ case "default":
isSystemWebhook = optional.Some(false)
- } else if typeValue == "all" {
+ case "all":
isSystemWebhook = optional.None[bool]()
}