order update refactor

This commit is contained in:
2026-02-01 15:34:06 +03:30
parent 918d774cad
commit 71319de649
12 changed files with 129 additions and 31 deletions
@@ -143,7 +143,7 @@ export class ProductController {
@ApiOperation({ summary: 'Get a product by id' })
@ApiParam({ name: 'id', required: true })
findById(@Param('id') id: string,) {
return this.productService.findById(id);
return this.productService.findById(+id);
}
@Patch('admin/products/:id')
@@ -154,7 +154,7 @@ export class ProductController {
@ApiParam({ name: 'id', required: true })
@ApiBody({ type: UpdateproductDto })
update(@Param('id') id: string, @Body() updateproductDto: UpdateproductDto) {
return this.productService.update(id, updateproductDto);
return this.productService.update(+id, updateproductDto);
}
@Delete('admin/products/:id')
@@ -164,7 +164,7 @@ export class ProductController {
@ApiOperation({ summary: 'Delete (soft) a product' })
@ApiParam({ name: 'id', required: true })
remove(@Param('id') id: string,) {
return this.productService.remove(id);
return this.productService.remove(+id);
}