Express 5: Optional Parameters (TypeError: Unexpected ?) #338
-
I have a route like this but i get this error in express 5. It is understandable that I need to use the new format, however, the error does not provide a line number, making it difficult to find in my existing codebase. Also, what even is the new solution to this?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
use |
Beta Was this translation helpful? Give feedback.
-
This also works and IMO clearer/cleaner |
Beta Was this translation helpful? Give feedback.
use
/users{/:userId}
instead