mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Send raw JSON.
This commit is contained in:
parent
631d124a61
commit
bb04015b46
3 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ export async function getCountry(req, ip) {
|
|||
|
||||
export async function parseSessionRequest(req) {
|
||||
const ip = getIpAddress(req);
|
||||
const { website_id, screen, language } = JSON.parse(req.body);
|
||||
const { website_id, screen, language } = req.body;
|
||||
const { userAgent, browser, os } = getDevice(req);
|
||||
const country = await getCountry(req, ip);
|
||||
const session_id = hash(`${website_id}${ip}${userAgent}${os}`);
|
||||
|
|
@ -79,7 +79,7 @@ export async function parseSessionRequest(req) {
|
|||
}
|
||||
|
||||
export function parseCollectRequest(req) {
|
||||
const { type, payload } = JSON.parse(req.body);
|
||||
const { type, payload } = req.body;
|
||||
|
||||
if (payload.session) {
|
||||
const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue