Express 5: Optional Parameters (TypeError: Unexpected ?) #338
Answered
by
wenerme
SupertigerDev
asked this question in
Q&A
-
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.
Answered by
wenerme
Nov 15, 2024
Replies: 2 comments 2 replies
-
use |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
blakeembrey
-
This also works and IMO clearer/cleaner |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use
/users{/:userId}
instead