🐛 Fix problem with team permissions redirection (#5839)

This commit is contained in:
Alonso Torres 2025-02-12 15:35:28 +01:00 committed by GitHub
parent 6b26adb187
commit fb0e22c16b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.exceptions :as ex]
[app.common.logging :as log]
[app.common.schema :as sm]
[app.common.types.team :as ctt]
@ -118,8 +119,10 @@
(let [team-id (:current-team-id state)
teams (get state :teams)
team (get teams team-id)]
(rx/of (set-current-team team)
(fetch-members))))))
(if (not team)
(rx/throw (ex/error :type :authentication))
(rx/of (set-current-team team)
(fetch-members)))))))
(defn initialize-team
[team-id]