mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 12:40:12 +00:00
Merge pull request #3589 from penpot/niwinz-develop-debug-import-fix
🐛 Fix clone operaton of dbg handler
This commit is contained in:
commit
53a9906736
@ -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]}]
|
||||||
:name (str "Cloned file: " filename)
|
(create-file conn {:id file-id
|
||||||
:project-id project-id
|
:name (str "Cloned file: " filename)
|
||||||
:profile-id profile-id
|
:project-id project-id
|
||||||
:data data})
|
:profile-id profile-id})
|
||||||
{::yrs/status 201
|
(db/update! conn :file
|
||||||
::yrs/body "OK CREATED"})
|
{:data data}
|
||||||
|
{:id file-id})
|
||||||
|
{::yrs/status 201
|
||||||
|
::yrs/body "OK CREATED"})))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(prepare-response (blob/decode data))))))
|
(prepare-response (blob/decode data))))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user