Skip to content

Commit

Permalink
Merge pull request #354 from Quickchive/feat/QA-346/add-category-v2
Browse files Browse the repository at this point in the history
chore: add auto categorise v2
  • Loading branch information
stae1102 authored Oct 3, 2024
2 parents a8a41ff + b15b2c3 commit dc6d5f4
Showing 1 changed file with 13 additions and 4 deletions.
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

0 comments on commit dc6d5f4

Please sign in to comment.