0
Fork 0
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:
alonso.torres 2021-06-02 15:46:41 +02:00 committed by Andrés Moya
parent 9f36f4fbe7
commit b76fef1e44

View file

@ -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