fix tests

This commit is contained in:
2023-02-04 21:51:09 -05:00
parent 064d2d3988
commit 42e2d1c76e
4 changed files with 12 additions and 3 deletions

View File

@ -85,7 +85,9 @@ defmodule Cannery.Accounts.Invites do
end
end
@spec get_invite_by_token(Invite.token()) :: {:ok, Invite.t()} | {:error, :invalid_token}
@spec get_invite_by_token(Invite.token() | nil) :: {:ok, Invite.t()} | {:error, :invalid_token}
defp get_invite_by_token(token) when token in [nil, ""], do: {:error, :invalid_token}
defp get_invite_by_token(token) do
Repo.one(
from i in Invite,