Hello everyone, I am working on project based on pedestal and I am having strange issue with routing. My route configuration looks like that:
["/team"
{:post `create-team}
["/users"
{:get `get-users}]
["/:team-id"
{:delete `delete-team
:put `update-team}]]
For some reason, when I try to send GET req to /team/users
it returns 404. If I add get handler for "/team/:team-id" it got called instead of /users
even thou I send request to /team/users
.
Why do those routes conflict? I didn't specify get handler for /:team-id
, so why does it conflict and what can I do about it?@aleh_atsman use the linear search router. See http://pedestal.io/reference/linear-search-router
See Caveats here http://pedestal.io/reference/prefix-tree-router#_caveats
re: prefix tree router which is the default
@ddeaguiar thx for fast reply!