This repository has been archived by the owner on Feb 4, 2025. It is now read-only.
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.
Fix Redirect Issue for Routes
/admin/users/password-token
and/admin/users/reset-password
Description:
This pull request addresses a routing issue in the Mercur.js project, which is based on the Medusa.js framework. The problem involved incorrect redirects for the routes
/admin/users/password-token
and/admin/users/reset-password
, which were erroneously directed to the user update route/admin/users/[user_id]
.Problem:
The routes /admin/users/password-token and /admin/users/reset-password were being redirected to the user update route
/admin/users/[user_id]
.It was not possible to override this behavior using middleware, making it difficult to implement password reset and token generation functionalities.
Solution:
Modified the routing logic so that the routes
/admin/users/password-token
and/admin/users/reset-password
are no longer redirected to the user update route.Added appropriate implementations to handle these routes and prevent incorrect redirection.
Testing:
/admin/users/[user_id]
still works correctly and allows for user data updates.Additional Information:
This pull request does not introduce any changes to existing user functionalities beyond improving the handling of routes related to password reset.
Please review the changes and approve the pull request to ensure the issue is resolved promptly.
Links to Related Issues:
github.com/mercurjs/mercur/issues/13