feat(products): enhance logging in create method for better request tracking
This commit is contained in:
@@ -128,7 +128,10 @@ export class ProductsController {
|
|||||||
@Roles('admin')
|
@Roles('admin')
|
||||||
@Post()
|
@Post()
|
||||||
create(@Body() body: CreateProductDto, @Request() req: any) {
|
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);
|
console.log('[ProductsController.create] Request received');
|
||||||
|
console.log('[ProductsController.create] User:', req.user);
|
||||||
|
console.log('[ProductsController.create] Body:', body);
|
||||||
|
return this.productsService.create(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post('pending')
|
@Post('pending')
|
||||||
|
|||||||
Reference in New Issue
Block a user