2024-03-18 16:12:41 -04:00
|
|
|
defmodule ChronoscopeWeb.API.V1.HealthController do
|
|
|
|
use ChronoscopeWeb, :controller
|
|
|
|
|
2024-05-04 15:06:40 -04:00
|
|
|
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
|
2024-05-04 15:06:40 -04:00
|
|
|
json(conn, %{healthy: healthy?()})
|
|
|
|
end
|
|
|
|
|
|
|
|
defp healthy?() do
|
|
|
|
NTS.healthy?() && Gemini.healthy?()
|
2024-03-18 16:12:41 -04:00
|
|
|
end
|
|
|
|
end
|