Skip to content

Instantly share code, notes, and snippets.

@weavejester
Created December 11, 2011 22:28
Show Gist options
  • Save weavejester/1463164 to your computer and use it in GitHub Desktop.
Save weavejester/1463164 to your computer and use it in GitHub Desktop.
(defn has-access? [id password]
(fetch-one :pads :where {:name id :password password}))
(defpage "/:id" {:keys [id password]}
(if (has-access? id password)
(common/layout id (notepad id))
(do (insert! :pads {:name id})
(resp/redirect "/"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment