mirror of
https://github.com/penpot/penpot.git
synced 2025-05-14 16:46:38 +02:00
🐛 Fix clone operaton of dbg handler
This commit is contained in:
parent
6080b778d4
commit
7aae12c732
1 changed files with 12 additions and 9 deletions
|
@ -111,15 +111,18 @@
|
||||||
|
|
||||||
(contains? params :clone)
|
(contains? params :clone)
|
||||||
(let [profile (profile/get-profile pool profile-id)
|
(let [profile (profile/get-profile pool profile-id)
|
||||||
project-id (:default-project-id profile)
|
project-id (:default-project-id profile)]
|
||||||
data (blob/decode data)]
|
|
||||||
(create-file pool {:id (uuid/next)
|
(db/run! pool (fn [{:keys [::db/conn]}]
|
||||||
|
(create-file conn {:id file-id
|
||||||
:name (str "Cloned file: " filename)
|
:name (str "Cloned file: " filename)
|
||||||
:project-id project-id
|
:project-id project-id
|
||||||
:profile-id profile-id
|
:profile-id profile-id})
|
||||||
:data data})
|
(db/update! conn :file
|
||||||
|
{:data data}
|
||||||
|
{:id file-id})
|
||||||
{::yrs/status 201
|
{::yrs/status 201
|
||||||
::yrs/body "OK CREATED"})
|
::yrs/body "OK CREATED"})))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(prepare-response (blob/decode data))))))
|
(prepare-response (blob/decode data))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue