Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashes in get param value is not accepted #51

Closed
thijsvanbuuren opened this issue Nov 23, 2016 · 5 comments
Closed

Dashes in get param value is not accepted #51

thijsvanbuuren opened this issue Nov 23, 2016 · 5 comments
Labels
type: fix Issues describing a broken feature.

Comments

@thijsvanbuuren
Copy link

@Get('/:uuid/stuff') public getSomething(@Param('uuid') uuid) { }
When i use the above, and sent a /1234-234234-24324234/stuff (as example)
I get a 'Error' @ HttpError.js:18:22

@thijsvanbuuren
Copy link
Author

If i do it through @Req() request and request.params.uuid it does work as a workaround

@pleerock
Copy link
Contributor

pleerock commented Nov 24, 2016

hmm thats strange, I'll need to check that

@pleerock pleerock added the type: fix Issues describing a broken feature. label Nov 24, 2016
@dgharsallah
Copy link

Hi, I wanted to fix the bug but it turned about that it is a JSON.parse syntax error (caused by the dash) since the string will be treated as an object if you don't specify the type.
So if you specify that uuid is a string you wont get the error @thijsvanbuuren

@pleerock
Copy link
Contributor

resolution is to specify a correct parameter type

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: fix Issues describing a broken feature.
Development

No branches or pull requests

3 participants