diff --git a/src/contents/contents.controller.ts b/src/contents/contents.controller.ts index dfbff5a..dabd7bd 100644 --- a/src/contents/contents.controller.ts +++ b/src/contents/contents.controller.ts @@ -61,6 +61,7 @@ import { LoadPersonalContentsOutput, } from './dtos/load-personal-contents.dto'; import { LoadReminderCountOutput } from './dtos/load-personal-remider-count.dto'; +import { GetLinkInfoResponseDto } from './dtos/get-link.response.dto'; @Controller('contents') @ApiTags('Contents') @@ -256,6 +257,19 @@ export class ContentsController { return this.contentsService.loadReminderCount(user); } + @ApiOperation({ + summary: 'OG 데이터 크롤링', + description: '링크 내 OG 데이터를 파싱합니다.', + }) + @ApiOkResponse({ + type: GetLinkInfoResponseDto, + }) + @UseGuards(JwtAuthGuard) + @Get('/og') + async getOgData(@Query('link') link: string) { + return this.contentsService.getLinkInfo(link); + } + @ApiOperation({ summary: '콘텐츠 문서 요약', description: '콘텐츠의 문서를 요약하는 메서드',