@auditauth/next 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk.js +1 -5
- package/package.json +1 -1
package/dist/sdk.js
CHANGED
|
@@ -194,15 +194,11 @@ class AuditAuthNext {
|
|
|
194
194
|
/* ------------------------------------------------------------------------ */
|
|
195
195
|
pushMetric(payload) {
|
|
196
196
|
let sid = this.cookies.get(SETTINGS.cookies.session_id.name);
|
|
197
|
-
if (!sid) {
|
|
198
|
-
sid = 's_' + crypto.randomUUID();
|
|
199
|
-
this.cookies.set(SETTINGS.cookies.session_id.name, sid, SETTINGS.cookies.session_id.config);
|
|
200
|
-
}
|
|
201
197
|
queueMicrotask(() => {
|
|
202
198
|
fetch(`${this.config.baseUrl}${SETTINGS.bff.paths.metrics}`, {
|
|
203
199
|
method: 'POST',
|
|
204
200
|
headers: { 'Content-Type': 'application/json' },
|
|
205
|
-
body: JSON.stringify({ ...payload, session_id: sid }),
|
|
201
|
+
body: JSON.stringify({ ...payload, session_id: sid ?? crypto.randomUUID() }),
|
|
206
202
|
}).catch(() => { });
|
|
207
203
|
});
|
|
208
204
|
}
|