-
카테고리
-
세부 분야
백엔드
-
해결 여부
해결됨
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;
}
답변을 작성해보세요.
2
답변 1