🐛 Keep Path out of update-team-photo audit props (#12530)

Nitrate encodes audit chunks as JSON and cannot serialize java.nio.file.Path;
mirror update-profile-photo and replace the upload map with safe props.
This commit is contained in:
Alejandro Alonso 2026-10-22 11:07:07 +02:00 committed by GitHub
parent 6acb360f4a
commit 347a52d514
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1104,7 +1104,7 @@
(update-team-photo cfg (assoc params :profile-id profile-id)))
(defn update-team-photo
[{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id] :as params}]
[{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id file] :as params}]
(let [team (get-team pool :profile-id profile-id :team-id team-id)
photo (profile/upload-photo cfg params)]
@ -1120,4 +1120,10 @@
{:photo-id (:id photo)}
{:id team-id})
(assoc team :photo-id (:id photo))))
(rph/with-meta (assoc team :photo-id (:id photo))
{::audit/replace-props
{:team-id team-id
:file-name (:filename file)
:file-size (:size file)
:file-path (str (:path file))
:file-mtype (:mtype file)}})))