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
