pedestal

Aleh Atsman 2020-10-12T15:09:13.073Z

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?

2020-10-12T15:12:35.073600Z

@aleh_atsman use the linear search router. See http://pedestal.io/reference/linear-search-router

2020-10-12T15:13:09.073800Z

See Caveats here http://pedestal.io/reference/prefix-tree-router#_caveats

2020-10-12T15:13:40.074100Z

re: prefix tree router which is the default

Aleh Atsman 2020-10-12T15:16:48.074400Z

@ddeaguiar thx for fast reply!

👍 1