bug
This commit is contained in:
@@ -47,7 +47,8 @@ export class CategoryController {
|
|||||||
@ApiOperation({ summary: 'Get category' })
|
@ApiOperation({ summary: 'Get category' })
|
||||||
@ApiOkResponse({ description: 'Category detail', type: CreateCategoryDto })
|
@ApiOkResponse({ description: 'Category detail', type: CreateCategoryDto })
|
||||||
@ApiNotFoundResponse({ description: 'Category not found' })
|
@ApiNotFoundResponse({ description: 'Category not found' })
|
||||||
findOne(@Param() id: string, @RestId() restId: string) {
|
@ApiParam({ name: 'id', required: true, type: String })
|
||||||
|
findOne(@Param('id') id: string, @RestId() restId: string) {
|
||||||
return this.categoryService.findOne(restId, id);
|
return this.categoryService.findOne(restId, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,15 @@ import {
|
|||||||
ApiQuery,
|
ApiQuery,
|
||||||
ApiBody,
|
ApiBody,
|
||||||
ApiParam,
|
ApiParam,
|
||||||
|
ApiBearerAuth,
|
||||||
} from '@nestjs/swagger';
|
} from '@nestjs/swagger';
|
||||||
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
||||||
import { RestId } from 'src/common/decorators';
|
import { RestId } from 'src/common/decorators';
|
||||||
|
|
||||||
@UseGuards(AdminAuthGuard)
|
@UseGuards(AdminAuthGuard)
|
||||||
@ApiTags('foods')
|
@ApiBearerAuth()
|
||||||
@Controller('foods')
|
@ApiTags('admin/foods')
|
||||||
|
@Controller('admin/foods')
|
||||||
export class FoodController {
|
export class FoodController {
|
||||||
constructor(private readonly foodsService: FoodService) {}
|
constructor(private readonly foodsService: FoodService) {}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class FindFoodsDto {
|
|||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiPropertyOptional({ example: 'cheese' })
|
@ApiPropertyOptional()
|
||||||
search?: string;
|
search?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@@ -32,7 +32,7 @@ export class FindFoodsDto {
|
|||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@ApiPropertyOptional({ example: 'category-ulid' })
|
@ApiPropertyOptional()
|
||||||
categoryId?: string;
|
categoryId?: string;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
|
|||||||
Reference in New Issue
Block a user