⬆️ Adapt some changes to latest version of buddy-hashers.

This commit is contained in:
Andrey Antukh 2020-09-15 15:34:49 +02:00 committed by Alonso Torres
parent d80c1f2bfb
commit bdefe0d04e
2 changed files with 4 additions and 4 deletions

View file

@ -113,7 +113,7 @@
(defn- verify-password
[attempt password]
(hashers/check attempt password))
(hashers/verify attempt password))
(defn- create-profile
"Create the profile entry on the database with limited input
@ -166,7 +166,7 @@
(when (= (:password profile) "!")
(ex/raise :type :validation
:code ::account-without-password))
(verify-password password (:password profile)))
(:valid (verify-password password (:password profile))))
(validate-profile [profile]
(when-not profile
@ -249,7 +249,7 @@
(defn- validate-password!
[conn {:keys [profile-id old-password] :as params}]
(let [profile (profile/retrieve-profile-data conn profile-id)]
(when-not (verify-password old-password (:password profile))
(when-not (:valid (verify-password old-password (:password profile)))
(ex/raise :type :validation
:code ::old-password-not-match))))