mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-20 16:40:59 +00:00
Fix test.
This commit is contained in:
parent
ff7afc0465
commit
f9ab38a443
1 changed files with 2 additions and 2 deletions
|
@ -40,8 +40,8 @@ defmodule Pleroma.Web.OAuth.Authorization do
|
||||||
if NaiveDateTime.diff(NaiveDateTime.utc_now, valid_until) < 0 do
|
if NaiveDateTime.diff(NaiveDateTime.utc_now, valid_until) < 0 do
|
||||||
Repo.update(use_changeset(auth, %{used: true}))
|
Repo.update(use_changeset(auth, %{used: true}))
|
||||||
else
|
else
|
||||||
{:error, "Token expired"}
|
{:error, "token expired"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def use_token(%Authorization{used: true}), do: {:error, "Already used"}
|
def use_token(%Authorization{used: true}), do: {:error, "already used"}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue