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.

Update batch.ts

Shrutesh796f6d448c83
diff --git a/src/pages/api/batch.ts b/src/pages/api/batch.ts
index 93632d114..0557d4da3 100644
--- a/src/pages/api/batch.ts
+++ b/src/pages/api/batch.ts
@@ -22,7 +22,13 @@ export default async function handler(req, res) {
const mockRes = {
...res,
- end: () => {}, // Prevent premature response closure
+ status: (code) => {
+ res.status(code);
+ return mockRes;
+ },
+ json: (data) => res.json(data),
+ setHeader: (key, value) => res.setHeader(key, value),
+ end: () => {},
};
await sendHandler(mockReq, mockRes);