I ended up creating different functions for different HTTP methods. So, each of those methods will be decorated with either @Get
, @Post
, @Patch
, @Put
and @Delete
.
All of them will call the same method underneath, and then I can achieve the logic I was looking for.
Thanks for all comments and help!