1
0
mirror of https://git.pleroma.social/sjw/pleroma.git synced 2024-12-28 22:55:13 +01:00

cap again

This commit is contained in:
Mark Felder 2018-03-19 18:00:02 +00:00
parent 2549a73d6d
commit 2702df489f

View File

@ -40,7 +40,7 @@ defmodule Pleroma.Web.OAuth.Authorization do
if NaiveDateTime.diff(NaiveDateTime.utc_now, valid_until) < 0 do
Repo.update(use_changeset(auth, %{used: true}))
else
{:error, "token expired"}
{:error, "Token expired"}
end
end
def use_token(%Authorization{used: true}), do: {:error, "Already used"}