-
-
Save Rhainur/c47bbd7391285762be88 to your computer and use it in GitHub Desktop.
Learning clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn find-by-credentials [email password] | |
(let [user (first (select users (where {:email email})))] | |
(if (and (some? user) | |
(crypt/compare password | |
(user :password))) | |
user))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment