mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 01:26:11 +02: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))
|
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
|
(sv/defmethod ::create-file-thumbnail
|
||||||
"Creates or updates the file thumbnail. Mainly used for paint the
|
"Creates or updates the file thumbnail. Mainly used for paint the
|
||||||
grid thumbnails."
|
grid thumbnails."
|
||||||
|
@ -405,10 +412,7 @@
|
||||||
::climit/key-fn ::rpc/profile-id
|
::climit/key-fn ::rpc/profile-id
|
||||||
::rtry/enabled true
|
::rtry/enabled true
|
||||||
::rtry/when rtry/conflict-exception?
|
::rtry/when rtry/conflict-exception?
|
||||||
::sm/params [:map {:title "create-file-thumbnail"}
|
::sm/params schema:create-file-thumbnail}
|
||||||
[:file-id ::sm/uuid]
|
|
||||||
[:revn :int]
|
|
||||||
[:media ::media/upload]]}
|
|
||||||
|
|
||||||
[cfg {:keys [::rpc/profile-id file-id] :as params}]
|
[cfg {:keys [::rpc/profile-id file-id] :as params}]
|
||||||
(db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}]
|
(db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue