ver productos y detalles

This commit is contained in:
2025-07-09 14:56:58 -04:00
parent 365cbd0d7a
commit 3a0b29d3c1
14 changed files with 144 additions and 91 deletions

View File

@@ -30,8 +30,8 @@ export class UsersController {
@ApiResponse({ status: 200, description: 'Return paginated products.' })
async findAllByUserId(@Req() req: Request, @Query() paginationDto: PaginationDto) {
console.log(req['user'].id)
const id = 1
// const id = Number(req['user'].id);
// const id = 1
const id = Number(req['user'].id);
const result = await this.inventoryService.findAllByUserId(id,paginationDto);
return {
message: 'products fetched successfully',
@@ -40,7 +40,7 @@ export class UsersController {
};
}
@Get(':id')
@Get('/id/:id')
// @Roles('admin')
@ApiOperation({ summary: 'Get a product by ID' })
@ApiResponse({ status: 200, description: 'Return the product.' })