Skip to content
Merged
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
17 changes: 13 additions & 4 deletions src/categories/v2/category.v2.controller.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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(
Expand Down