Skip to content

Instantly share code, notes, and snippets.

@caioaao
Last active May 15, 2018 19:36
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 caioaao/700cfb60defb9cb466fd673c891afd1d to your computer and use it in GitHub Desktop.
Save caioaao/700cfb60defb9cb466fd673c891afd1d to your computer and use it in GitHub Desktop.
(defn with-password-hash [user]
(assoc user :password-hash (hash (user :password))))
(defn with-creation-date [user as-of]
(assoc user :created-at as-of))
(defn handle-user-registration! [user-data as-of]
(db/save-user! (with-password-hash (with-creation-date user-data as-of))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment