mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Removed getJsonBody.
This commit is contained in:
parent
a7ea202785
commit
620011a837
3 changed files with 5 additions and 13 deletions
|
|
@ -130,11 +130,3 @@ export async function getClientInfo(req: NextApiRequestCollect, { screen }) {
|
|||
|
||||
return { userAgent, browser, os, ip, country, subdivision1, subdivision2, city, device };
|
||||
}
|
||||
|
||||
export function getJsonBody<T>(req): T {
|
||||
if ((req.headers['content-type'] || '').indexOf('text/plain') !== -1) {
|
||||
return JSON.parse(req.body);
|
||||
}
|
||||
|
||||
return req.body;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue