diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-02 17:01:26 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-02 17:01:26 +0700 |
commit | 1b3d92192194baf6b431cd9f0ce58062d1b703d5 (patch) | |
tree | 2f81ff81c7b039ccbb482e5212af554a8982ac40 /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | 4212527928020de5b67424f090c67fc20d0844af (diff) | |
download | pleroma-1b3d92192194baf6b431cd9f0ce58062d1b703d5.tar.gz |
change `Repo.get(User, id)` => `User.get_by_id(id)`
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index ebb3dd253..75506e168 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -108,7 +108,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do fixed_token = fix_padding(params["code"]), %Authorization{} = auth <- Repo.get_by(Authorization, token: fixed_token, app_id: app.id), - %User{} = user <- Repo.get(User, auth.user_id), + %User{} = user <- User.get_by_id(auth.user_id), {:ok, token} <- Token.exchange_token(app, auth), {:ok, inserted_at} <- DateTime.from_naive(token.inserted_at, "Etc/UTC") do response = %{ |