인프런 커뮤니티 질문&답변
post 업데이트 코드 이렇게 작성해도 되나요?
해결된 질문
작성
·
270
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;
}




