0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Merge pull request #1997 from penpot/niwinz-make-s3-storace-region-optional

 Make the region param optional on s3 storage backend
This commit is contained in:
Alejandro 2022-06-14 13:33:10 +02:00 committed by GitHub
commit 58a1060ed8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@
;; --- BACKEND INIT
(s/def ::region #{:eu-central-1})
(s/def ::region ::us/keyword)
(s/def ::bucket ::us/string)
(s/def ::prefix ::us/string)
(s/def ::endpoint ::us/string)
@ -68,9 +68,10 @@
(s/keys :opt-un [::region ::bucket ::prefix ::endpoint ::wrk/executor]))
(defmethod ig/prep-key ::backend
[_ {:keys [prefix] :as cfg}]
[_ {:keys [prefix region] :as cfg}]
(cond-> (d/without-nils cfg)
prefix (assoc :prefix prefix)))
(some? prefix) (assoc :prefix prefix)
(nil? region) (assoc :region :eu-central-1)))
(defmethod ig/init-key ::backend
[_ cfg]