From 010ab3d8fd93b9e3202d5c16481a34d360a0b2de Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 17 Jan 2024 11:57:19 +0100 Subject: [PATCH] Split if into multiple whens Otherwise weird behavior. --- src/main/cljc/dda/c4k_forgejo/core.cljc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/cljc/dda/c4k_forgejo/core.cljc b/src/main/cljc/dda/c4k_forgejo/core.cljc index ba9e12a..0236572 100644 --- a/src/main/cljc/dda/c4k_forgejo/core.cljc +++ b/src/main/cljc/dda/c4k_forgejo/core.cljc @@ -46,14 +46,15 @@ (postgres/generate-service) (forgejo/generate-deployment config) (forgejo/generate-service) - (forgejo/generate-service-ssh) + (forgejo/generate-service-ssh) (forgejo/generate-data-volume config) (forgejo/generate-appini-env config) (forgejo/generate-secrets auth)] - (if (contains? config :average) - (do (forgejo/generate-rate-limit-ingress-and-cert config) - (forgejo/generate-rate-limit-middleware config)) - (forgejo/generate-ingress-and-cert config)) + (when (contains? config :average) + (forgejo/generate-rate-limit-ingress-and-cert config) ; this function has a vector as output + [(forgejo/generate-rate-limit-middleware config)]) ; this does not + (when (not (contains? config :average)) + (forgejo/generate-ingress-and-cert config)) (when (contains? config :restic-repository) [(backup/generate-config config) (backup/generate-secret auth)