From c0eab96253a734d3b13a9a01b3d717ff72a9a5f3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 11 Oct 2022 14:53:08 +0200 Subject: [PATCH] :sparkles: Do not return the whole file on file rename --- backend/src/app/rpc/mutations/files.clj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/app/rpc/mutations/files.clj b/backend/src/app/rpc/mutations/files.clj index 3e87ef0cb..b93047639 100644 --- a/backend/src/app/rpc/mutations/files.clj +++ b/backend/src/app/rpc/mutations/files.clj @@ -119,10 +119,11 @@ (defn- rename-file [conn {:keys [id name] :as params}] - (db/update! conn :file - {:name name} - {:id id})) - + (-> (db/update! conn :file + {:name name + :modified-at (dt/now)} + {:id id}) + (select-keys [:id :name :created-at :modified-at]))) ;; --- Mutation: Set File shared