mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Compare commits
No commits in common. "dcc1ae186443a286703a1222c6a598d51d76ddf7" and "0ddec97bf02427930e4fe07b53516efc73d3d577" have entirely different histories.
dcc1ae1864
...
0ddec97bf0
2 changed files with 3 additions and 16 deletions
|
|
@ -18,20 +18,7 @@ export async function POST(request: Request) {
|
|||
|
||||
let index = 0;
|
||||
for (const data of body) {
|
||||
// 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 newRequest = new Request(request, { body: JSON.stringify(data) });
|
||||
const response = await send.POST(newRequest);
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ async function relationalQuery(
|
|||
sum(${getTimestampDiffSQL('t.min_time', 't.max_time')}) as "totaltime"
|
||||
from (
|
||||
select
|
||||
${column} as name,
|
||||
${column} 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 ${column}, website_event.session_id, website_event.visit_id
|
||||
group by name, website_event.session_id, website_event.visit_id
|
||||
) as t
|
||||
where name != ''
|
||||
group by name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue