order update refactor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user