🐛 Fix incorrect feature handling on absorb-library! fn

Used in shared flag assignation and library deletion
This commit is contained in:
Andrey Antukh 2023-11-30 13:15:50 +01:00 committed by Andrés Moya
parent 0a77bae8a7
commit 76a6f077a6
12 changed files with 194 additions and 116 deletions

View file

@ -149,11 +149,17 @@
(sv/defmethod ::get-team
{::doc/added "1.17"
::sm/params schema:get-team}
[cfg {:keys [::rpc/profile-id id file-id]}]
(db/tx-run! cfg #(get-team % :profile-id profile-id :team-id id :file-id file-id)))
[{:keys [::db/pool]} {:keys [::rpc/profile-id id file-id]}]
(get-team pool :profile-id profile-id :team-id id :file-id file-id))
(defn get-team
[conn & {:keys [profile-id team-id project-id file-id] :as params}]
(dm/assert!
"connection or pool is mandatory"
(or (db/connection? conn)
(db/pool? conn)))
(dm/assert!
"profile-id is mandatory"
(uuid? profile-id))
@ -655,7 +661,7 @@
(defn update-team-photo
[{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id] :as params}]
(let [team (get-team cfg :profile-id profile-id :team-id team-id)
(let [team (get-team pool :profile-id profile-id :team-id team-id)
photo (profile/upload-photo cfg params)]
(db/with-atomic [conn pool]