mirror of
https://github.com/benbusby/farside.git
synced 2025-06-08 02:16:36 +00:00
add last_updated to status
This commit is contained in:
parent
4793c6ffec
commit
12fde1fdc6
1 changed files with 8 additions and 1 deletions
|
@ -42,7 +42,14 @@ defmodule Farside.Router do
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/status" do
|
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"}])
|
conn = conn |> merge_resp_headers([{"content-type", "application/json"}])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue