mirror of
https://github.com/penpot/penpot.git
synced 2025-04-16 00:41:25 -05:00
💄 Define a RPC schema as standalone var for create-file-thumbnail
This commit is contained in:
parent
dabb9d0a82
commit
658c26014b
1 changed files with 8 additions and 4 deletions
|
@ -395,6 +395,13 @@
|
|||
|
||||
media))
|
||||
|
||||
(def ^:private
|
||||
schema:create-file-thumbnail
|
||||
[:map {:title "create-file-thumbnail"}
|
||||
[:file-id ::sm/uuid]
|
||||
[:revn :int]
|
||||
[:media ::media/upload]])
|
||||
|
||||
(sv/defmethod ::create-file-thumbnail
|
||||
"Creates or updates the file thumbnail. Mainly used for paint the
|
||||
grid thumbnails."
|
||||
|
@ -405,10 +412,7 @@
|
|||
::climit/key-fn ::rpc/profile-id
|
||||
::rtry/enabled true
|
||||
::rtry/when rtry/conflict-exception?
|
||||
::sm/params [:map {:title "create-file-thumbnail"}
|
||||
[:file-id ::sm/uuid]
|
||||
[:revn :int]
|
||||
[:media ::media/upload]]}
|
||||
::sm/params schema:create-file-thumbnail}
|
||||
|
||||
[cfg {:keys [::rpc/profile-id file-id] :as params}]
|
||||
(db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}]
|
||||
|
|
Loading…
Add table
Reference in a new issue