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

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