projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma]
/
lib
/
pleroma
/
web
/
oauth
/
token.ex
diff --git
a/lib/pleroma/web/oauth/token.ex
b/lib/pleroma/web/oauth/token.ex
index 90c304487fd61377dcffc69ecf2c4bc3a1f4b2c8..8ea3738058c4148808c2f3926dff71e82b303090 100644
(file)
--- a/
lib/pleroma/web/oauth/token.ex
+++ b/
lib/pleroma/web/oauth/token.ex
@@
-21,7
+21,7
@@
defmodule Pleroma.Web.OAuth.Token do
field(:refresh_token, :string)
field(:scopes, {:array, :string}, default: [])
field(:valid_until, :naive_datetime_usec)
field(:refresh_token, :string)
field(:scopes, {:array, :string}, default: [])
field(:valid_until, :naive_datetime_usec)
- belongs_to(:user, User, type:
Pleroma.FlakeId
)
+ belongs_to(:user, User, type:
FlakeId.Ecto.CompatType
)
belongs_to(:app, App)
timestamps()
belongs_to(:app, App)
timestamps()
@@
-44,8
+44,7
@@
defmodule Pleroma.Web.OAuth.Token do
|> Repo.find_resource()
end
|> Repo.find_resource()
end
- @spec exchange_token(App.t(), Authorization.t()) ::
- {:ok, Token.t()} | {:error, Changeset.t()}
+ @spec exchange_token(App.t(), Authorization.t()) :: {:ok, Token.t()} | {:error, Changeset.t()}
def exchange_token(app, auth) do
with {:ok, auth} <- Authorization.use_token(auth),
true <- auth.app_id == app.id do
def exchange_token(app, auth) do
with {:ok, auth} <- Authorization.use_token(auth),
true <- auth.app_id == app.id do