How is the elegant way to handle non standard HTTP methods like COPY, LINK, LOCK, UNLOCK in NestJs Controller?
For standard HTTP Methods Request such GET, POST, PUT... We have a decorator like @Get, @Post, etc. But i want to handle some requests with LOCK, UNLOCK and some others... in an elegant way....
I Try to use @All decorator, but i think its not ideal...
I Lookig for something like:
@COPY('auth/copy-user-rights')
async copy_user_rights(): Promise<... {
......
}
You can make use of the
@RequestMapping()decorator and manually apply the path and method, and tell Typescript to ignore the error. It seems to work on a minimum reproductionStartup logs
curl