We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
I have the issue which was discussed but can't apply the suggested resolving.
I have two DELETE like bellow :
@delete('/agent/:id') async deleteInactiveAgentFromProfiles( @param('id') id: string, ): Promise { return this.profilesService.deleteInactiveAgentFromProfilesById(id); } @delete(':id') async deleteProfile(@param('id') id: string): Promise { return this.profilesService.deleteProfileById(id); }
@delete('/agent/:id') async deleteInactiveAgentFromProfiles( @param('id') id: string, ): Promise { return this.profilesService.deleteInactiveAgentFromProfilesById(id); }
@delete(':id') async deleteProfile(@param('id') id: string): Promise { return this.profilesService.deleteProfileById(id); }
My ids smt like this /^UPC-[0-9A-F]{19}-[0-9A-F]{1}$/
/^UPC-[0-9A-F]{19}-[0-9A-F]{1}$/
So regarding this issue in second DELETE I have to do smth like this @Delete('/:id(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/') But it doesn’t work.
@Delete('/:id(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/')
What I'm doing wrong?
Thank for helping.
The text was updated successfully, but these errors were encountered:
Could you try @Delete(/(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/)?
@Delete(/(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/)
Sorry, something went wrong.
Unfortunately, it doesn’t work. Argument of type 'RegExp' is not assignable to parameter of type 'string | string[]'.
Argument of type 'RegExp' is not assignable to parameter of type 'string | string[]'.
Having same issue
Interesting, one question is does you have the same issue with the built-in RounterModule in nestjs?
RounterModule
Also, maybe it should work like so @Delete('/:id(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/')
No branches or pull requests
Hello!
I have the issue which was discussed but can't apply the suggested resolving.
I have two DELETE like bellow :
My ids smt like this
/^UPC-[0-9A-F]{19}-[0-9A-F]{1}$/
So regarding this issue in second DELETE I have to do smth like this
@Delete('/:id(^UPC-[0-9A-F]{19}-[0-9A-F]{1}$)/')
But it doesn’t work.
What I'm doing wrong?
Thank for helping.
The text was updated successfully, but these errors were encountered: