-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
If a url like /users/ is received, the final slash is removed automatically, and it matches with the following nodes chain:
<root> -> users
However, it should match with:
<root> -> users -> <empty string>
So, the typical CRUD in the examples should be these nodes:
<root>
users
<empty> (handle GET, POST) `/users/`
{user_id} (handle GET, PATCH, DELETE) `/users/22`
Finally, if the url matches <root> -> users, (the url_parts array still contains an empty item) so in this case, return an automatic redirect to the same url with slash (better a relative url).
NOTE: this way needs an extra node for users