feat(auth): add detailed logging in JwtAuthGuard and JwtStrategy for better debugging

feat(products): enhance logging in create method to track requests and user details
This commit is contained in:
Nils-Johan Gynther
2026-04-19 17:08:14 +02:00
parent 6c4683242c
commit 3ad634f348
3 changed files with 19 additions and 4 deletions
+2 -2
View File
@@ -127,8 +127,8 @@ export class ProductsController {
@Roles('admin')
@Post()
create(@Body() body: CreateProductDto) {
return this.productsService.create(body);
create(@Body() body: CreateProductDto, @Request() req: any) {
console.log('[ProductsController.create] Request received');\n console.log('[ProductsController.create] User:', req.user);\n console.log('[ProductsController.create] Body:', body);\n return this.productsService.create(body);
}
@Post('pending')