mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
🐛 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:
parent
6acb360f4a
commit
347a52d514
@ -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)}})))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user