Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/policy/policy.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Sse,
MessageEvent,
Param,
ParseUUIDPipe,
Query,
Body,
HttpCode,
Expand Down Expand Up @@ -377,7 +378,7 @@ export class PolicyController {
},
})
@ApiErrorResponse(404, 'No product found for the given ID.', undefined, 'Product not found')
async updateProduct(@Param('id') id: string, @Body() dto: UpdateProductDto) {
async updateProduct(@Param('id', new ParseUUIDPipe()) id: string, @Body() dto: UpdateProductDto) {
const product = await this.policy.updateProduct(id, dto);
return { success: true, data: product };
}
Expand All @@ -400,7 +401,7 @@ export class PolicyController {
},
})
@ApiErrorResponse(404, 'No product found for the given ID.', undefined, 'Product not found')
async deactivateProduct(@Param('id') id: string) {
async deactivateProduct(@Param('id', new ParseUUIDPipe()) id: string) {
const product = await this.policy.deactivateProduct(id);
return { success: true, data: product };
}
Expand Down