Skip to content

Commit

Permalink
feat: get title, content from url
Browse files Browse the repository at this point in the history
  • Loading branch information
JonghunAn committed Jun 29, 2024
1 parent b6b54d2 commit 940216c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/modules/posts/posts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Injectable } from '@nestjs/common';
import { CreatePostDto } from '@src/modules/posts/dto/create-post.dto';
import { PostsRepository } from '@src/modules/posts/posts.repository';
import { AwsLambdaService } from '@src/infrastructure/aws-lambda/aws-lambda.service';
import { parseLinkTitleAndContent } from '@src/common';

@Injectable()
export class PostsService {
Expand All @@ -13,13 +14,13 @@ export class PostsService {
createPostDto: CreatePostDto,
userId: string,
): Promise<boolean> {
// TODO get title from url
const title: string = 'temp title';

// TODO lambda function name
const { title, content } = await parseLinkTitleAndContent(
createPostDto.url,
);
// TODO ai 요청용 람다 함수 생성 후 작업
// const ai_lambda_function_name = 'ai_lambda_function_name';
// const payload = {
// postContent: 'contents',
// postContent: content,
// folderList: ['dummy_folder_list'],
// };
// this.awsLambdaService.invoke_lambda(ai_lambda_function_name, payload);
Expand Down

0 comments on commit 940216c

Please sign in to comment.