fix: add test coverage for api

This commit is contained in:
guarzo
2025-07-12 22:28:59 +00:00
parent 63f13711cc
commit 7b9e2c4fd9
61 changed files with 5657 additions and 5693 deletions

View File

@@ -91,7 +91,7 @@ defmodule WandererAppWeb.CommonAPIController do
with {:ok, solar_system_str} <- APIUtils.require_param(params, "id"),
{:ok, solar_system_id} <- APIUtils.parse_int(solar_system_str) do
case CachedInfo.get_system_static_info(solar_system_id) do
{:ok, system} ->
{:ok, system} when not is_nil(system) ->
# Get basic system data
data = static_system_to_json(system)
@@ -105,6 +105,11 @@ defmodule WandererAppWeb.CommonAPIController do
conn
|> put_status(:not_found)
|> json(%{error: "System not found"})
{:ok, nil} ->
conn
|> put_status(:not_found)
|> json(%{error: "System not found"})
end
else
{:error, msg} ->