aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-04-02 16:10:38 +0200
committerlain <lain@soykaf.club>2019-04-02 16:10:38 +0200
commit39bcf93007a5a52ba374099d6b04692361e7fa9b (patch)
tree358becb7f089c62d9f2a2634ca766ee7e7bad3f3 /lib/pleroma/web/common_api/utils.ex
parentfd07745d1b18e2a1eeb88a99eaa9d5e728d1aa71 (diff)
parent180b87257cae481d4d9ffc9f03a06268ad8df569 (diff)
downloadpleroma-39bcf93007a5a52ba374099d6b04692361e7fa9b.tar.gz
Merge remote-tracking branch 'origin/develop' into fix-slow-relationships
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index f596f703b..40cea3090 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -31,7 +31,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
def get_replied_to_activity(""), do: nil
def get_replied_to_activity(id) when not is_nil(id) do
- Repo.get(Activity, id)
+ Activity.get_by_id(id)
end
def get_replied_to_activity(_), do: nil
@@ -275,7 +275,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
end
def confirm_current_password(user, password) do
- with %User{local: true} = db_user <- Repo.get(User, user.id),
+ with %User{local: true} = db_user <- User.get_by_id(user.id),
true <- Pbkdf2.checkpw(password, db_user.password_hash) do
{:ok, db_user}
else