-
Notifications
You must be signed in to change notification settings - Fork 28
User mentor extension update #1577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sumanvpacewisdom
wants to merge
7
commits into
develop
Choose a base branch
from
USER_MENTOR_EXTENSION_UPDATE
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f9d85fe
Enhance mentor and session queries to include organization and tenant…
sumanvpacewisdom b0886b9
Update session request mapping query to include connection status, en…
sumanvpacewisdom 2e319ec
Merge branch 'develop' of https://github.com/ELEVATE-Project/mentorin…
sumanvpacewisdom 4312f46
Fix circular dependency in organization cache and enhance session que…
sumanvpacewisdom 64ade2d
Refactor database query files to exclude partition key columns from u…
sumanvpacewisdom c67c7aa
Merge pull request #1573 from ELEVATE-Project/USER_DELETE_SELF_DELETE
sumanvpacewisdom 44d3c61
Merge branch 'NEW_DEVELOP_QA_17_02_2026' into USER_MENTOR_EXTENSION_U…
sumanvpacewisdom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| 'use strict' | ||
|
|
||
| /** | ||
| * Organization Cache Helper | ||
| * | ||
| * FIX: Created this wrapper to break circular dependency | ||
| * | ||
| * ROOT CAUSE: Circular dependency chain caused "getDefaults is not a function" error: | ||
| * cacheHelper.js → getDefaultOrgId.js → user.js → cacheHelper.js | ||
| * | ||
| * When Node.js loads these modules: | ||
| * 1. cacheHelper.js starts loading, imports getDefaultOrgId.js | ||
| * 2. getDefaultOrgId.js imports user.js (for userRequests.fetchOrgDetails) | ||
| * 3. user.js imports cacheHelper.js | ||
| * 4. cacheHelper.js is not fully loaded yet, returns partial/empty exports | ||
| * 5. getDefaults function is undefined at this point | ||
| * | ||
| * SOLUTION: user.js now imports this wrapper instead of cacheHelper directly. | ||
| * This breaks the cycle because: | ||
| * cacheHelper.js → getDefaultOrgId.js → user.js → organizationCache.js → cacheHelper.js | ||
| * | ||
| * Even though there's still a path to cacheHelper, the actual cacheHelper functions | ||
| * are only called at RUNTIME (inside set/get functions), not at MODULE LOAD TIME. | ||
| * By the time these functions are called, all modules are fully loaded. | ||
| */ | ||
|
|
||
| const cacheHelper = require('@generics/cacheHelper') | ||
|
|
||
| /** | ||
| * Set organization details in cache | ||
| */ | ||
| exports.set = async (tenantCode, orgCode, orgId, data) => { | ||
| return await cacheHelper.organizations.set(tenantCode, orgCode, orgId, data) | ||
| } | ||
|
|
||
| /** | ||
| * Get organization details from cache | ||
| */ | ||
| exports.get = async (tenantCode, orgCode, orgId) => { | ||
| return await cacheHelper.organizations.get(tenantCode, orgCode, orgId) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed in the validator right if added in the req body?