mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 09:08:31 -05:00
🐛 Fix unexpected exception on logout handler.
This commit is contained in:
parent
9319520043
commit
9ec90c8bd9
2 changed files with 8 additions and 8 deletions
|
@ -74,13 +74,13 @@
|
|||
|
||||
(defn logout-handler
|
||||
[req]
|
||||
(let [token (get-in req [:cookies "auth-token"])
|
||||
token (uuid/from-string token)]
|
||||
(-> (session/delete token)
|
||||
(some-> (get-in req [:cookies "auth-token"])
|
||||
(uuid/from-string)
|
||||
(session/delete)
|
||||
(p/then' (fn [token]
|
||||
{:status 204
|
||||
:cookies {"auth-token" nil}
|
||||
:body ""})))))
|
||||
:body ""}))))
|
||||
|
||||
(defn echo-handler
|
||||
[req]
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
[handler]
|
||||
(fn [request]
|
||||
(let [token (parse-token request)]
|
||||
(-> (retrieve token)
|
||||
(-> (p/do! (retrieve token))
|
||||
(p/then (fn [profile-id]
|
||||
(if profile-id
|
||||
(handler (assoc request :profile-id profile-id))
|
||||
|
|
Loading…
Add table
Reference in a new issue