mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 23:41:24 -05:00
✨ Change create file to send data from the frontend
This commit is contained in:
parent
9f36f4fbe7
commit
b76fef1e44
1 changed files with 3 additions and 3 deletions
|
@ -54,11 +54,11 @@
|
|||
(db/insert! conn :file-profile-rel))))
|
||||
|
||||
(defn create-file
|
||||
[conn {:keys [id name project-id is-shared]
|
||||
[conn {:keys [id name project-id is-shared data]
|
||||
:or {is-shared false}
|
||||
:as params}]
|
||||
(let [id (or id (uuid/next))
|
||||
data (cp/make-file-data id)
|
||||
(let [id (or id (:id data) (uuid/next))
|
||||
data (or data (cp/make-file-data id))
|
||||
file (db/insert! conn :file
|
||||
{:id id
|
||||
:project-id project-id
|
||||
|
|
Loading…
Add table
Reference in a new issue