From b15b2c38efc4d6d826817f627ea85543f499af2e Mon Sep 17 00:00:00 2001 From: stae1102 Date: Thu, 3 Oct 2024 18:27:01 +0900 Subject: [PATCH] =?UTF-8?q?[QA-346]=20=EB=AA=85=EC=84=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/categories/v2/category.v2.controller.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/categories/v2/category.v2.controller.ts b/src/categories/v2/category.v2.controller.ts index 28898c4..aea2c26 100644 --- a/src/categories/v2/category.v2.controller.ts +++ b/src/categories/v2/category.v2.controller.ts @@ -1,5 +1,10 @@ -import { Controller, Get, Query, UseGuards } from '@nestjs/common'; -import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { Controller, Get, HttpStatus, Query, UseGuards } from '@nestjs/common'; +import { + ApiBearerAuth, + ApiOperation, + ApiResponse, + ApiTags, +} from '@nestjs/swagger'; import { JwtAuthGuard } from '../../auth/jwt/jwt.guard'; import { CategoryService } from '../category.service'; import { AuthUser } from '../../auth/auth-user.decorator'; @@ -14,11 +19,15 @@ export class CategoryV2Controller { constructor(private readonly categoryService: CategoryService) {} @ApiOperation({ - summary: '아티클 카테고리 자동 지정', + summary: '아티클 카테고리 자동 지정 V2', description: - '아티클에 적절한 카테고리를 유저의 카테고리 목록에서 찾는 메서드', + '아티클에 적절한 카테고리를 유저의 카테고리 목록에서 찾는 메서드. 유저가 사용하는 카테고리를 기반으로 카테고리 id와 함께 추천합니다.', }) @UseGuards(JwtAuthGuard) + @ApiResponse({ + status: HttpStatus.OK, + type: RecommendedCategoryResponseDto, + }) @Get('auto-categorize') async autoCategorize(@AuthUser() user: User, @Query('link') link: string) { const { category } = await this.categoryService.autoCategorizeWithId(