mirror of
https://github.com/penpot/penpot.git
synced 2026-05-01 22:28:15 +00:00
✨ Change create file to send data from the frontend
This commit is contained in:
parent
9f36f4fbe7
commit
b76fef1e44
@ -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…
x
Reference in New Issue
Block a user