Last active
May 7, 2016 10:56
-
-
Save susischmidt/db4ce7b159263e937d020a59fca7e128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have: | |
mounted under plack/toadfarm under /communication: | |
my $msgs = $r->under('/messages/:recipient')->to('messages#list_by_user')->name('users_messages'); | |
$msgs->get('/archive') | |
->to('messages#list_archived') | |
->name('show_archived_messages'); | |
# and a bunch more | |
I have at the bottom a catchall "route doesn't exist". | |
$r->any('*' => \&catchall_403); | |
my route listings shows: | |
/ | |
+/messages/:recipient * messagesrecipient | |
+/ GET "users_messages" | |
+/archive GET "show_archived_messages" | |
+/expert GET "show_berater_messages" | |
+/unread GET "show_unread_messages" | |
When I call the god damn thing | |
curl -s -X GET -H "Content-Type: application/json" http://localhost:5000/communication/messages/mytestuser | |
the "under" route fails and doesn't match - but ALL subroutes do succeed and return the proper data. | |
how can /messages/:recipient NOT match /messages/mytestuser but /messages/mytestuser/unread etc etc?! | |
I don't see it. :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment