Skip to content

Commit

Permalink
Fix with-session.
Browse files Browse the repository at this point in the history
  • Loading branch information
benkard committed Feb 23, 2009
1 parent 1d8771d commit 72a1c69
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cljssss-g.clj
Expand Up @@ -17,9 +17,6 @@
:subname "cljssss-g.sqlite3"
:create true})

;; FIXME: WAAAAAAAAAH!
(def session {:id false})

(defmacro with-db [& body]
`(sql/with-connection db-connection-data
~@body))
Expand Down Expand Up @@ -91,10 +88,10 @@
]]))))

(defmacro with-session [& body]
`(if (not (session :id))
`(if (not (~'session :id))
(redirect-to "/login")
(do ~@body)))


(defservlet cljssss-g
(GET "/login"
Expand Down

0 comments on commit 72a1c69

Please sign in to comment.