@mindfulauth/core 2.0.0-beta.7 → 2.0.0-beta.8
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.
|
@@ -46,16 +46,12 @@ async function loadQRCodeLibrary() {
|
|
|
46
46
|
// ============================================================================
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* Extracts
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* - All protected routes require /{memberid}/page URL structure
|
|
53
|
-
* - Backend extracts memberid from URL path and validates against session
|
|
54
|
-
* - Frontend receives memberid via window.MEMBERID injection
|
|
55
|
-
* @returns {string|null} The recordid if found, null otherwise
|
|
49
|
+
* Extracts the recordId from the URL path (/{memberid}/...).
|
|
50
|
+
* The memberid is the first path segment, already validated server-side by middleware.
|
|
51
|
+
* @returns {string|undefined} The recordId if found, undefined otherwise
|
|
56
52
|
*/
|
|
57
53
|
function getRecordId() {
|
|
58
|
-
return window.
|
|
54
|
+
return window.location.pathname.split('/').filter(Boolean)[0] || undefined;
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
// ============================================================================
|