fix:My application ID transmission issue#1771
Conversation
WalkthroughThe pull request updates Main.vue to retrieve the current user's ID from a meta service API and use it for filtering applications by creator, replacing a previously hardcoded value. This change ties application filtering to the authenticated user's identity. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/workspace/application-center/src/Main.vue`:
- Around line 169-176: The getApplicationList function constructs
params.currentPage/pageSize/name/createdBy using getUserInfo(); update the
createdBy assignment to safely read the id using optional chaining (e.g., use
info?.id) so that when the user object lacks an id the code doesn't throw;
locate getApplicationList and the getUserInfo call and replace direct access to
info.id with a guarded access (info?.id) while keeping the existing logic that
sets createdBy to '' when state.appFilter === 'all'.
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit