Skip to content

Commit

Permalink
Add FIXME for future reference
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Jul 23, 2024
1 parent 36c1310 commit a38b8f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/co/gaiwan/compass/routes/sessions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
""
[req]
(if-not (:identity req)
;; FIXME: we should redirect to /sessions/:id/participate after redirect (or
;; similar, depending on what makes sense with htmx)
(util/redirect (oauth/flow-init-url {:redirect-url "/sessions/new"}))
(do
(let [user-id-str (:identity req)
Expand All @@ -74,7 +76,7 @@
capacity (:session/capacity session)
current-pv (:session/participants session)
next-pv (conj current-pv user-id-str)]
;;TODO
;;TODO
;; Write some code to handle the case that :db/cas throws exception at race condition
(if (< (count current-pv) capacity)
@(db/transact [[:db/cas session-eid :session/participants current-pv next-pv]])
Expand Down

0 comments on commit a38b8f5

Please sign in to comment.