Send raw JSON.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user