From aec67352d52ea35b67b7e651209f4829cc1e395f Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 19 Jan 2024 09:44:55 +0100 Subject: [PATCH] [Skip-CI] Add ToDos --- src/main/cljc/dda/c4k_forgejo/core.cljc | 2 +- src/main/cljc/dda/c4k_forgejo/forgejo.cljc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/cljc/dda/c4k_forgejo/core.cljc b/src/main/cljc/dda/c4k_forgejo/core.cljc index d5c172d..504fb01 100644 --- a/src/main/cljc/dda/c4k_forgejo/core.cljc +++ b/src/main/cljc/dda/c4k_forgejo/core.cljc @@ -50,7 +50,7 @@ (forgejo/generate-data-volume config) (forgejo/generate-appini-env config) (forgejo/generate-secrets auth)] - (when (contains? config :average) + (when (contains? config :average) ; ToDo: just leave this out and make sensible defaults (forgejo/generate-rate-limit-ingress-and-cert config)) ; this function has a vector as output (when (contains? config :average) [(forgejo/generate-rate-limit-middleware config)]) ; this does not diff --git a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc index ebeb9e7..da9632e 100644 --- a/src/main/cljc/dda/c4k_forgejo/forgejo.cljc +++ b/src/main/cljc/dda/c4k_forgejo/forgejo.cljc @@ -42,7 +42,7 @@ (s/def ::mailer-pw pred/bash-env-string?) (s/def ::issuer pred/letsencrypt-issuer?) (s/def ::volume-total-storage-size (partial pred/int-gt-n? 5)) -(s/def ::average int?) +(s/def ::average int?) (s/def ::burst int?) (def config? (s/keys :req-un [::fqdn @@ -137,7 +137,7 @@ ; using :average and :burst seems sensible, :period may be interesting for fine tuning later on (defn-spec generate-rate-limit-middleware pred/map-or-seq? [config config?] - (let [{:keys [average burst]} config] + (let [{:keys [average burst]} config] ; ToDo: Set defaults, don't read config ; refactor ":average" KW to smth more speaking (-> (yaml/load-as-edn "forgejo/middleware-ratelimit.yaml") (cm/replace-key-value :average average)