TwitterAPI.UtilController: fix dialyzer errors

lib/pleroma/web/twitter_api/controllers/util_controller.ex:300:pattern_match
The pattern can never match the type.

Pattern:
{:error, :no_such_alias}

Type:
{:not_found, nil}

lib/pleroma/web/twitter_api/controllers/util_controller.ex:304:pattern_match
The pattern can never match the type.

Pattern:
{:error, _error}

Type:
{:not_found, nil}
This commit is contained in:
Mark Felder 2024-01-26 17:21:48 -05:00
parent a24322fcce
commit 28af5e3bd7
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ defp find_user_by_nickname(nickname) do
user = User.get_cached_by_nickname(nickname)
if user == nil do
{:not_found, nil}
{:error, :not_found}
else
{:ok, user}
end