Add OAuth tokens endpoint
This commit is contained in:
parent
33f8f3c33a
commit
61a4bc5095
6 changed files with 75 additions and 0 deletions
|
|
@ -52,4 +52,12 @@ defmodule Pleroma.Web.OAuth.Token do
|
|||
)
|
||||
|> Repo.delete_all()
|
||||
end
|
||||
|
||||
def get_user_tokens(%User{id: user_id}) do
|
||||
from(
|
||||
t in Pleroma.Web.OAuth.Token,
|
||||
where: t.user_id == ^user_id
|
||||
)
|
||||
|> Repo.all()
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue