medusa
medusa copied to clipboard
API Routes / Express Endpoints incompatibilities
Bug report
Hello everyone, I am currently trying to implement a marketplace using MercurJS based on the Medusa backend. I'm facing issues with the implementation of the password-reset route, but I think this is likely to affect other routes as well because of the routing design.
Describe the bug
The route.ts file in the source of Mercur overrides the POST method for all ids that occur within the /admin/users route.
This does not just override the functionality for posting specific user entities, but also override routes like /admin/users/password-token. It is currently not clear based on the Documentation of Medusa how to solve such issues.
Here is the code that currently handles the password-token route in the MedusaJS Api. It does it using the Express endpoints api. It is not clear how this can be integrated in the API Routes approach.
System information
Medusa version (including plugins): Node.js version: Database: Operating system: Browser (if relevant):
Steps to reproduce the behavior
- Setup the MercurJS backend using the CLI
- Try to execute the /admin/users/password-token route
Expected behavior
The password token is generated so the user can reset the password.