• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    해결됨

post 업데이트 코드 이렇게 작성해도 되나요?

23.12.01 00:10 작성 조회수 190

0

 

 async patchPost(id: number, title: string, content: string, author: string) {
    const post = await this.postsRepository.save({
      id,
      title,
      content,
      author,
    });
    if (!post) {
      throw new NotFoundException();
    }
    return post;
  }

답변 1

답변을 작성해보세요.

2

안녕하세요!

가능합니다!

감사합니다!

채널톡 아이콘