chore: Public metrics config API endpoint (#10568)

vb-nft-collection-trigger-metadata-refetch-admin-api-endpoint
Victor Baranov 4 months ago committed by GitHub
parent 678b544d7e
commit 343b159c77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      apps/block_scout_web/lib/block_scout_web/controllers/api/v2/config_controller.ex
  2. 1
      apps/block_scout_web/lib/block_scout_web/routers/api_router.ex

@ -16,4 +16,12 @@ defmodule BlockScoutWeb.API.V2.ConfigController do
|> put_status(200)
|> json(%{limit: limit})
end
def public_metrics(conn, _params) do
public_metrics_update_period_hours = Application.get_env(:explorer, Explorer.Chain.Metrics)[:update_period_hours]
conn
|> put_status(200)
|> json(%{update_period_hours: public_metrics_update_period_hours})
end
end

@ -108,6 +108,7 @@ defmodule BlockScoutWeb.Routers.ApiRouter do
scope "/config" do
get("/backend-version", V2.ConfigController, :backend_version)
get("/csv-export", V2.ConfigController, :csv_export)
get("/public-metrics", V2.ConfigController, :public_metrics)
end
scope "/transactions" do

Loading…
Cancel
Save