Skip to content

Instantly share code, notes, and snippets.

/create-user.clj Secret

Created November 29, 2014 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/06326dd2adb3048d14e3 to your computer and use it in GitHub Desktop.
Save anonymous/06326dd2adb3048d14e3 to your computer and use it in GitHub Desktop.
(defn create-user
"Creates a user in the database if valid fields are supplied.
Requires name and email"
[params]
(if (b/valid? params user-validator)
(let [{:keys [first-name last-name email password phone]} params]
(create-user-in-db! spec first-name last-name email password phone))
(b/validate params user-validator)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment