fix the middleware first param [numPathComponents] #159
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.
Hello,Im very appreciate you write such a wonderful moduel.
I found some wrong when I use the middleware.
Here is my code
I need the ACL to split the resource named
courses
and I try to useacl.middleware(2)' to split the url, but when I debug the code . I could not get the right result ,the middleware function use that code to handle the url in line 630 of
acl/lib/acl.js`It return the resource is still
'/v1/courses'
in the code above.I check the readme doc found this:
So , I guess the right code might be this:
Then I can get
courses
resource that I expected.Hope it help,have a good day!