Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Ignore websiteId when updating reports

Mike Cao4e3e6b3bd76e
diff --git a/src/app/(compat)/compat/api/reports/[reportId]/route.ts b/src/app/(compat)/compat/api/reports/[reportId]/route.ts
index 3de9a017f..1673a4265 100644
--- a/src/app/(compat)/compat/api/reports/[reportId]/route.ts
+++ b/src/app/(compat)/compat/api/reports/[reportId]/route.ts
@@ -37,7 +37,7 @@ export async function POST(
}
const { reportId } = await params;
- const { websiteId, type, name, description, parameters } = body;
+ const { type, name, description, parameters } = body;
const report = await getReport(reportId);
@@ -49,8 +49,9 @@ export async function POST(
return unauthorized();
}
+ // Reports cannot be relocated to another website via update.
+ // The body websiteId is intentionally ignored.
const result = await updateReport(reportId, {
- websiteId,
type,
name,
description,