From b76fef1e445ec65583825d174194cc8e96ff8f3e Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 2 Jun 2021 15:46:41 +0200 Subject: [PATCH] :sparkles: Change create file to send data from the frontend --- backend/src/app/rpc/mutations/files.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app/rpc/mutations/files.clj b/backend/src/app/rpc/mutations/files.clj index d6fb24c595..d90e453fb6 100644 --- a/backend/src/app/rpc/mutations/files.clj +++ b/backend/src/app/rpc/mutations/files.clj @@ -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