Fixed formatting and test
This commit is contained in:
parent
5bfb7b4ce6
commit
98b36d359a
2 changed files with 3 additions and 8 deletions
|
|
@ -189,7 +189,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
|
||||
def confirm_current_password(user, params) do
|
||||
with %User{local: true} = db_user <- Repo.get(User, user.id),
|
||||
true <- Pbkdf2.checkpw(params["password"], db_user.password_hash) do
|
||||
true <- Pbkdf2.checkpw(params["password"], db_user.password_hash) do
|
||||
{:ok, db_user}
|
||||
else
|
||||
_ -> {:error, "Invalid password."}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue