Skip to content
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: implement findRelativeRessourcePath function to fix PatchResourc… #714

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

froz42
Copy link

@froz42 froz42 commented Jan 23, 2025

This merge request fix issue #713 "Autopatch not working when a prefix is present in the path"

Technical details

I implemented a new function findRelativeRessourcePath in the autopatch package that removes the prefix from the path before searching for the resource in the router by comparing the PUT path and request path.

It will strip the request path until the prefix of the PUT path prefix is found.

It think a better solution could be found if with a proper rework.

I wrote unit tests for the new function.

…e when prefix

That fix a bug that when the path had prefix like "/api" a 404 error occured
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant