From 2b31613853e45d55d46e29a72e8af10b6fb3db51 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 23 Dec 2024 12:40:40 +0100 Subject: [PATCH] :bug: Fix file deletion exception --- frontend/src/app/main/data/dashboard.cljs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/dashboard.cljs b/frontend/src/app/main/data/dashboard.cljs index 49756a559..54f64e965 100644 --- a/frontend/src/app/main/data/dashboard.cljs +++ b/frontend/src/app/main/data/dashboard.cljs @@ -361,7 +361,7 @@ ;; --- EVENT: delete-file (defn file-deleted - [_team-id project-id] + [project-id] (ptk/reify ::file-deleted ptk/UpdateEvent (update [_ state] @@ -378,10 +378,9 @@ (d/update-when :recent-files dissoc id))) ptk/WatchEvent - (watch [_ state _] - (let [team-id (uuid/uuid (get-in state [:route :path-params :team-id]))] - (->> (rp/cmd! :delete-file {:id id}) - (rx/map #(file-deleted team-id project-id))))))) + (watch [_ _ _] + (->> (rp/cmd! :delete-file {:id id}) + (rx/map (partial file-deleted project-id)))))) ;; --- Rename File