change Repo.get(User, id) => User.get_by_id(id)

This commit is contained in:
Egor Kislitsyn 2019-04-02 17:01:26 +07:00
commit 1b3d921921
23 changed files with 110 additions and 114 deletions

View file

@ -27,7 +27,7 @@ defmodule Pleroma.Web.OAuth.Token do
def exchange_token(app, auth) do
with {:ok, auth} <- Authorization.use_token(auth),
true <- auth.app_id == app.id do
create_token(app, Repo.get(User, auth.user_id), auth.scopes)
create_token(app, User.get_by_id(auth.user_id), auth.scopes)
end
end