bug in favorite
This commit is contained in:
@@ -38,7 +38,7 @@ export class FoodController {
|
||||
@ApiHeader(API_HEADER_SLUG)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Get a product by id' })
|
||||
findPublicFoodById(@Param('id') productId: string, @UserId() userId?: string): Promise<any> {
|
||||
findPublicFoodById(@Param('id') productId: string, @UserId() userId: string): Promise<any> {
|
||||
const a = this.productService.findPublicById(productId, userId);
|
||||
return a;
|
||||
}
|
||||
@@ -48,8 +48,8 @@ export class FoodController {
|
||||
@ApiHeader(API_HEADER_SLUG)
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'toggle a product as favorite' })
|
||||
@ApiParam({ name: 'productId', required: true })
|
||||
setAsFavorute(@Param('productId') productId: string, @UserId() userId: string) {
|
||||
@ApiParam({ name: 'id', required: true, description: 'Product ID' })
|
||||
setAsFavorite(@Param('id') productId: string, @UserId() userId: string) {
|
||||
return this.productService.toggleFavorite(userId, productId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user