Fork me on GitHub
#pedestal
<
2020-10-12
>
Aleh Atsman15:10:13

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?

ddeaguiar15:10:40

re: prefix tree router which is the default

Aleh Atsman15:10:48

@ddeaguiar thx for fast reply!

👍 3