Update token.ex

This commit is contained in:
Maxim Filippov 2019-02-11 09:48:24 +00:00
parent 62a45bdc11
commit 760fec4cb8

View File

@ -47,7 +47,7 @@ defmodule Pleroma.Web.OAuth.Token do
def delete_user_tokens(%User{id: user_id}) do
from(
t in Pleroma.Web.OAuth.Token,
t in Token,
where: t.user_id == ^user_id
)
|> Repo.delete_all()
@ -55,7 +55,7 @@ defmodule Pleroma.Web.OAuth.Token do
def delete_user_token(%User{id: user_id}, token_id) do
from(
t in Pleroma.Web.OAuth.Token,
t in Token,
where: t.user_id == ^user_id,
where: t.id == ^token_id
)