mirror of
https://github.com/plausible/analytics.git
synced 2025-01-05 00:23:48 +03:00
7dbbc8ba22
* Use site id instead of hostname for events * Use site id in domain status check * Revert change to tracking module * Catch more places where link generation needed updating * Rename site_id to domain * Drop hostname index from events
18 lines
367 B
Elixir
18 lines
367 B
Elixir
defmodule PlausibleWeb.Api.InternalController do
|
|
use PlausibleWeb, :controller
|
|
use Plausible.Repo
|
|
|
|
def domain_status(conn, %{"domain" => domain}) do
|
|
has_pageviews = Repo.exists?(
|
|
from e in Plausible.Event,
|
|
where: e.domain == ^domain
|
|
)
|
|
|
|
if has_pageviews do
|
|
json(conn, "READY")
|
|
else
|
|
json(conn, "WAITING")
|
|
end
|
|
end
|
|
end
|