mirror of
https://github.com/benbusby/farside.git
synced 2025-04-19 06:45:55 -04:00
add last_updated to status
This commit is contained in:
parent
4793c6ffec
commit
12fde1fdc6
@ -42,7 +42,14 @@ defmodule Farside.Router do
|
||||
end
|
||||
|
||||
get "/status" do
|
||||
resp = Jason.encode!(Farside.get_services_map())
|
||||
services = Farside.get_services_map()
|
||||
|
||||
data = %{
|
||||
last_updated: DateTime.truncate(Farside.get_last_updated(), :second),
|
||||
services: services
|
||||
}
|
||||
|
||||
resp = Jason.encode!(data)
|
||||
|
||||
conn = conn |> merge_resp_headers([{"content-type", "application/json"}])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user