Fixed formatting and test

This commit is contained in:
Syldexia 2018-05-13 14:56:59 +01:00
commit 98b36d359a
2 changed files with 3 additions and 8 deletions

View file

@ -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."}