mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Refactor properties format to move all properties objects to the root level of the req body
This commit is contained in:
parent
b704a6b918
commit
00f5efec51
@ -10,7 +10,6 @@ const { isUsingTypeScriptSync } = require('@strapi/typescript-utils');
|
||||
const ee = require('../../utils/ee');
|
||||
const machineID = require('../../utils/machine-id');
|
||||
const { generateAdminUserHash } = require('./admin-user-hash');
|
||||
const stringifyDeep = require('./stringify-deep');
|
||||
|
||||
const defaultQueryOpts = {
|
||||
timeout: 1000,
|
||||
@ -72,13 +71,11 @@ module.exports = (strapi) => {
|
||||
event,
|
||||
adminUserId,
|
||||
deviceId,
|
||||
properties: {
|
||||
eventProperties: stringifyDeep({ ...payload?.eventProperties }),
|
||||
userProperties: stringifyDeep({ ...payload?.userProperties, ...anonymousUserProperties }),
|
||||
groupProperties: stringifyDeep({
|
||||
...payload?.groupProperties,
|
||||
...anonymousGroupProperties,
|
||||
}),
|
||||
eventProperties: payload.eventProperties,
|
||||
userProperties: { ...anonymousUserProperties, ...payload.userProperties },
|
||||
groupProperties: {
|
||||
...anonymousGroupProperties,
|
||||
...payload.groupProperties,
|
||||
},
|
||||
}),
|
||||
..._.merge({}, defaultQueryOpts, opts),
|
||||
|
Loading…
x
Reference in New Issue
Block a user