aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-04-02 10:52:29 +0000
committerlambda <lain@soykaf.club>2019-04-02 10:52:29 +0000
commit26d509cc861ad865b12d187fc163fa78c4c128a7 (patch)
treeafdc885e17def5b2f65c3dbc8c33aa595f06026b /lib/pleroma/web/oauth/oauth_controller.ex
parentb5d486d9ac40c051c23d23ef5a48685d08127904 (diff)
parent11c2d6bdc458d40616e677ff71e471bd827344ee (diff)
downloadpleroma-26d509cc861ad865b12d187fc163fa78c4c128a7.tar.gz
Merge branch 'get_by_id' into 'develop'
Replace `Repo.get(Module, id)` with `Module.get_by_id(id)` where possible See merge request pleroma/pleroma!1009
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex2
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 = %{