mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Update batch.ts
This commit is contained in:
parent
de8f5c4413
commit
796f6d448c
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue