Offset-based pagination duplicates if continuous event stream and query period includes the present moment

This commit is contained in:
Artur Pata 2024-09-11 19:14:49 +03:00
parent 38b6be8f02
commit 8fa3e25eed

View File

@ -3328,6 +3328,10 @@ defmodule PlausibleWeb.Api.ExternalStatsController.QueryTest do
assert json_response(conn1, 200)["meta"]["total_rows"] == 8 assert json_response(conn1, 200)["meta"]["total_rows"] == 8
populate_stats(site, [
build(:pageview, pathname: "/0")
])
conn2 = conn2 =
post(conn, "/api/v2/query", Map.put(query, "pagination", %{"limit" => 3, "offset" => 3})) post(conn, "/api/v2/query", Map.put(query, "pagination", %{"limit" => 3, "offset" => 3}))