인프런 커뮤니티 질문&답변

southgyuios19님의 프로필 이미지

작성한 질문수

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

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

해결된 질문

23.12.01 00:10 작성

·

199

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

코드팩토리님의 프로필 이미지
코드팩토리
지식공유자

2023. 12. 01. 00:15

안녕하세요!

가능합니다!

감사합니다!