MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getOverrideDeviceId

Function getOverrideDeviceId

apps/api/src/controllers/track.controller.ts:90–97  ·  view source on GitHub ↗
(
  body: ITrackHandlerPayload
)

Source from the content-addressed store, hash-verified

88
89// Resolve a caller-supplied device id from a track event's `properties.__deviceId`.
90export function getOverrideDeviceId(
91 body: ITrackHandlerPayload
92): string | undefined {
93 if (body.type !== 'track') {
94 return undefined;
95 }
96 return sanitizeOverrideDeviceId(body.payload?.properties?.__deviceId);
97}
98
99export function getTimestamp(
100 timestamp: FastifyRequest['timestamp'],

Callers 2

buildContextFunction · 0.85

Calls 1

sanitizeOverrideDeviceIdFunction · 0.85

Tested by

no test coverage detected