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

15 lines
284 B
Elixir
Raw Normal View History

2024-03-18 16:12:41 -04:00
defmodule ChronoscopeWeb.API.V1.HealthController do
use ChronoscopeWeb, :controller
alias Chronoscope.Gemini
2024-03-23 12:19:13 -04:00
alias Chronoscope.NTS
2024-03-18 16:12:41 -04:00
def get(conn, _params) do
json(conn, %{healthy: healthy?()})
end
defp healthy?() do
NTS.healthy?() && Gemini.healthy?()
2024-03-18 16:12:41 -04:00
end
end