mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 23:26:39 +02: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))))
|
(db/insert! conn :file-profile-rel))))
|
||||||
|
|
||||||
(defn create-file
|
(defn create-file
|
||||||
[conn {:keys [id name project-id is-shared]
|
[conn {:keys [id name project-id is-shared data]
|
||||||
:or {is-shared false}
|
:or {is-shared false}
|
||||||
:as params}]
|
:as params}]
|
||||||
(let [id (or id (uuid/next))
|
(let [id (or id (:id data) (uuid/next))
|
||||||
data (cp/make-file-data id)
|
data (or data (cp/make-file-data id))
|
||||||
file (db/insert! conn :file
|
file (db/insert! conn :file
|
||||||
{:id id
|
{:id id
|
||||||
:project-id project-id
|
:project-id project-id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue