X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Foauth%2Ftoken.ex;h=2b5ad9b9448bdfae6579878e6bfa53e2f518c067;hb=9e0567ec5237fc7a2ba37f5291962f3c58fd21f8;hp=a8b06db36d90fb83ddb1b5f0e554218d9c01b24d;hpb=fee360e581d9aced145d21429eba5a63b3f682d1;p=akkoma diff --git a/lib/pleroma/web/oauth/token.ex b/lib/pleroma/web/oauth/token.ex index a8b06db36..2b5ad9b94 100644 --- a/lib/pleroma/web/oauth/token.ex +++ b/lib/pleroma/web/oauth/token.ex @@ -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