You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/controllers/api/funnels_controller.ex

14 lines
322 B
Elixir

defmodule PlausibleWeb.Api.FunnelsController do
use PlausibleWeb, :controller
alias Plausible.Funnels
def show(conn, %{"id" => funnel_id}) do
site_id = conn.assigns.site.id
{funnel_id, ""} = Integer.parse(funnel_id)
funnel = Funnels.evaluate(:nop, funnel_id, site_id)
json(conn, funnel)
end
end