Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@SergioBenitez For speed purposes, should dynamic parts of the route always come later? For example if I have 3 routes: <account_id>/cart_items WHERE: Under the hood, how does the rocket decision tree work for checking the routes? Does it recognize that <account_id>/checkout and <account_id>/cart_items both have account_id as type AccountId?
Logically each account has elements to it, so organizing the paths in a folder-esk way is nice in the sense that I can imagine it as: Warren/ But if that causes multiple parsings of <account_id> then I would opt for a different layout as this will slow down the system. |
Beta Was this translation helpful? Give feedback.
-
I am confused as to why these 2 routes collide:
GET /api/cart_items/<cart_item_id> collides with (read_account_services_by_seller_id) GET /api/<seller_id>/services
AccountId routing is done via the following pattern:
"{}-{}", self.id, self.class
For example:
f2717522-fd53-4bba-a2e8-daa054ed53ed-seller
Where:
Why do I need to set the priority on these manually?
My thought is that if something formatted as
GET /api/cart_items/<cart_item_id>
will never succeed onGET /api/<seller_id>/services
and vice versa as Uuid and AccountID serialize differently.Beta Was this translation helpful? Give feedback.
All reactions