Compare commits

...

6 commits

Author SHA1 Message Date
Mike Cao
dcc1ae1864
Merge pull request #3787 from RaenonX/master
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Fixed `/api/batch` request recreation failure
2025-11-25 16:08:02 -08:00
Mike Cao
5a44e6deb2
Merge pull request #3791 from travzhang/master
fix: fix SQL syntax error in getPageviewExpandedMetrics query
2025-11-25 16:05:58 -08:00
Travis Zhang
67e1af7e55
fix: fix SQL syntax error in getPageviewExpandedMetrics query 2025-11-25 21:13:35 +08:00
RaenonX
2b34cbeb37
Fixed /api/batch request recreation failure 2025-11-24 08:07:31 +08:00
Mike Cao
aaa1f9dc58 Merge branch 'dev'
Some checks failed
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled
2025-11-18 10:27:02 -08:00
Mike Cao
24b017cad8
Merge pull request #3765 from umami-software/dev
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
v3.0.1
2025-11-17 22:39:48 -08:00
2 changed files with 16 additions and 3 deletions

View file

@ -18,7 +18,20 @@ export async function POST(request: Request) {
let index = 0;
for (const data of body) {
const newRequest = new Request(request, { body: JSON.stringify(data) });
// Recreate a fresh Request since `new Request(request)` will have the following error:
// > Cannot read private member #state from an object whose class did not declare it
// Copy headers we received, ensure JSON content type, and avoid conflicting content-length
const headers = new Headers(request.headers);
headers.set('content-type', 'application/json');
headers.delete('content-length');
const newRequest = new Request(request.url, {
method: 'POST',
headers,
body: JSON.stringify(data),
});
const response = await send.POST(newRequest);
if (!response.ok) {

View file

@ -86,7 +86,7 @@ async function relationalQuery(
sum(${getTimestampDiffSQL('t.min_time', 't.max_time')}) as "totaltime"
from (
select
${column} name,
${column} as name,
website_event.session_id,
website_event.visit_id,
count(*) as "c",
@ -101,7 +101,7 @@ async function relationalQuery(
and website_event.event_type != 2
${excludeDomain}
${filterQuery}
group by name, website_event.session_id, website_event.visit_id
group by ${column}, website_event.session_id, website_event.visit_id
) as t
where name != ''
group by name