From afb5ab7430b1cc66f728f33a812a7e0c6eefd8c2 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Fri, 25 Oct 2024 12:23:35 +0200 Subject: [PATCH] :sparkles: Rename welcome file --- backend/src/app/setup/welcome_file.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/app/setup/welcome_file.clj b/backend/src/app/setup/welcome_file.clj index 8de4acaa7..7c8f30d6d 100644 --- a/backend/src/app/setup/welcome_file.clj +++ b/backend/src/app/setup/welcome_file.clj @@ -10,6 +10,7 @@ [app.db :as db] [app.rpc :as-alias rpc] [app.rpc.climit :as-alias climit] + [app.rpc.commands.files :as files] [app.rpc.commands.files-update :as fupdate] [app.rpc.commands.management :as management] [app.rpc.commands.profile :as profile] @@ -51,9 +52,11 @@ :project-id (:default-project-id profile)} template-stream (tmpl/get-template-stream cfg "welcome") file-id (-> (management/clone-template cfg params template-stream) - first)] + first) + file-name (str fullname "'s first file")] (db/tx-run! cfg (fn [{:keys [::db/conn] :as cfg}] + (files/rename-file conn {:id file-id :name file-name}) (fupdate/update-file! cfg file-id update-welcome-shape fullname) (profile/update-profile-props cfg id {:welcome-file-id file-id}) (db/exec-one! conn [sql:mark-file-object-thumbnails-deleted file-id])