Skip to content

Commit dc6d5f4

Browse files
authored
Merge pull request #354 from Quickchive/feat/QA-346/add-category-v2
chore: add auto categorise v2
2 parents a8a41ff + b15b2c3 commit dc6d5f4

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/categories/v2/category.v2.controller.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import { Controller, Get, Query, UseGuards } from '@nestjs/common';
2-
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
1+
import { Controller, Get, HttpStatus, Query, UseGuards } from '@nestjs/common';
2+
import {
3+
ApiBearerAuth,
4+
ApiOperation,
5+
ApiResponse,
6+
ApiTags,
7+
} from '@nestjs/swagger';
38
import { JwtAuthGuard } from '../../auth/jwt/jwt.guard';
49
import { CategoryService } from '../category.service';
510
import { AuthUser } from '../../auth/auth-user.decorator';
@@ -14,11 +19,15 @@ export class CategoryV2Controller {
1419
constructor(private readonly categoryService: CategoryService) {}
1520

1621
@ApiOperation({
17-
summary: '아티클 카테고리 자동 지정',
22+
summary: '아티클 카테고리 자동 지정 V2',
1823
description:
19-
'아티클에 적절한 카테고리를 유저의 카테고리 목록에서 찾는 메서드',
24+
'아티클에 적절한 카테고리를 유저의 카테고리 목록에서 찾는 메서드. 유저가 사용하는 카테고리를 기반으로 카테고리 id와 함께 추천합니다.',
2025
})
2126
@UseGuards(JwtAuthGuard)
27+
@ApiResponse({
28+
status: HttpStatus.OK,
29+
type: RecommendedCategoryResponseDto,
30+
})
2231
@Get('auto-categorize')
2332
async autoCategorize(@AuthUser() user: User, @Query('link') link: string) {
2433
const { category } = await this.categoryService.autoCategorizeWithId(

0 commit comments

Comments
 (0)