-
Notifications
You must be signed in to change notification settings - Fork 265
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
Fix server host resolving issue in rule get resources api #7450
Conversation
🦋 Changeset detectedThe changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7450 +/- ##
=======================================
Coverage 41.98% 41.98%
=======================================
Files 42 42
Lines 936 936
Branches 214 233 +19
=======================================
Hits 393 393
+ Misses 543 499 -44
- Partials 0 44 +44
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -44,7 +44,7 @@ const useGetResourcesList = <Data = any, Error = RequestErrorInterface>( | |||
"Content-Type": "application/json" | |||
}, | |||
method: HttpMethods.GET, | |||
url: store.getState().config.deployment.idpConfigs.serverOrigin + `/api/server/v1${endpointPath}` | |||
url: Config.resolveServerHost() + `/api/server/v1${endpointPath}` |
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.
Is there any reason we haven't taken these values from the endpoint configuration? Ex:- https://github.com/wso2/identity-apps/blob/master/features/admin.applications.v1/configs/endpoints.ts
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.
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.
I think still we can define the static part in endpoint.ts
file. Then you can change the endpoint path dynamically like the following logic.
store.getState().config.endpoints.actions.youendpoint + dynamicEndpoint
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.
If this is urgent, let's send the fix now and refactor the code in a separate PR.
Purpose