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

Account for / routes in RestAdapter.allRoutes #488

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

getsnoopy
Copy link

Previously, there was a bug in RestAdapter.allRoutes where the paths for routes which were mounted at / would return as empty instead of the expected / because of some trailing slash removal logic that was faulty. This commit fixes this so that it accounts for cases where the path itself is /, so the logic will leave those unchanged.

Fixes #487

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

Previously, there was a bug in RestAdapter.allRoutes where the paths for
routes which were mounted at / would return as empty instead of the
expected / because of some trailing slash removal logic that was faulty.
This commit fixes this so that it accounts for cases where the path
itself is /, so the logic will leave those unchanged.

Fixes strongloop#487
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.

Route paths are empty when model is mounted at /
1 participant