change Repo.get(User, id) => User.get_by_id(id)
This commit is contained in:
parent
4212527928
commit
1b3d921921
23 changed files with 110 additions and 114 deletions
|
|
@ -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 = %{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue