Skip to content

Commit

Permalink
feat: expose og crawling api
Browse files Browse the repository at this point in the history
  • Loading branch information
stae1102 committed Jan 28, 2024
1 parent 4070027 commit cd415dc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/contents/contents.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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: '콘텐츠의 문서를 요약하는 메서드',
Expand Down

0 comments on commit cd415dc

Please sign in to comment.