chronoscope/lib/chronoscope_web/controllers/api/v1/health_controller.ex

15 lines
284 B
Elixir

defmodule ChronoscopeWeb.API.V1.HealthController do
use ChronoscopeWeb, :controller
alias Chronoscope.Gemini
alias Chronoscope.NTS
def get(conn, _params) do
json(conn, %{healthy: healthy?()})
end
defp healthy?() do
NTS.healthy?() && Gemini.healthy?()
end
end