Aliases: add module aliases for 9 nested module references Apply: replace apply/3 with direct module attribute calls Line length: break 1 long spec line Refactoring: extract helpers to reduce complexity and nesting in show.ex, radio.ex, weather workers, terrain, duct detection, backfill dashboard, contact map, and mix tasks
14 lines
308 B
Elixir
14 lines
308 B
Elixir
defmodule MicrowavepropWeb.HealthController do
|
|
use MicrowavepropWeb, :controller
|
|
|
|
alias Ecto.Adapters.SQL
|
|
|
|
def check(conn, _params) do
|
|
# Verify DB is reachable
|
|
SQL.query!(Microwaveprop.Repo, "SELECT 1")
|
|
|
|
conn
|
|
|> put_resp_content_type("text/plain")
|
|
|> send_resp(200, "ok")
|
|
end
|
|
end
|