canned icon indicating copy to clipboard operation
canned copied to clipboard

any as a directory name

Open seafoodbuffet opened this issue 9 years ago • 1 comments

I'm trying to figure out how to use the following example from the docs:

/comment/any/votes/index.get.json

it seems to me like requests such as GET /comment/1/votes/ GET /comment/asdfasdf/votes/ or even GET /comment/2/votes

should all map to this file.

However, that doesn't appear to be the behavior I'm seeing. Instead, I get 404 errors. Is this the designed behavior or is it a bug?

seafoodbuffet avatar Sep 08 '16 20:09 seafoodbuffet

Yes that should work, and if it doesn't it is indeed a bug. Thanks for reporting! If you got some time and would like to help out a testcase which reproduces is highly welcome, feel free to add it in the https://github.com/sideshowcoder/canned/blob/master/spec/canned.spec.js I feel like this should be covered by the https://github.com/sideshowcoder/canned/blob/master/spec/lookup.spec.js but I guess there is some error down the line when moving this piece of code around.

sideshowcoder avatar Sep 09 '16 09:09 sideshowcoder