Route handler using the decorator to register #2665
-
coming over from another framework has had me scratching my head. does the router have to be added after the routes (or registered before with a .register() for each route handler? ie:
or
this feels like a bunch of developer overhead. is there a reason for this? i would think attaching the route handler to the router via the decorator would make it easier wouldn't it (or if it is.. how?) be possible to use:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I believe this was thoroughly discussed in https://discord.com/channels/919193495116337154/1131595764045459496/1173628032355926036 and below. If you have any more questions let us know :) |
Beta Was this translation helpful? Give feedback.
-
so PSA for anyone wanting to nest routers to the horror of some.. behold my glorious implimentation!
ie for accounts
this way if you change anything in the chain it reflects horizontally. the Router inside the route_handlers is to be able to start a "new" segment |
Beta Was this translation helpful? Give feedback.
I believe this was thoroughly discussed in https://discord.com/channels/919193495116337154/1131595764045459496/1173628032355926036 and below. If you have any more questions let us know :)