Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions back/src/main/java/com/back/domain/post/post/entity/Post.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
public class Post extends BaseEntity {
@NotNull(message = "제목은 null일 수 없습니다.")
private String title;

@NotNull
@Column(columnDefinition = "TEXT")
private String content;

@ManyToOne(fetch = FetchType.LAZY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public PostCreateResponse createPost(PostCreateRequest postCreateRequest, Member
.build();


if(postType == Post.PostType.PRACTICEPOST) {
post.updateJob(postCreateRequest.job());
}
// if(postType == Post.PostType.PRACTICEPOST) {
// post.updateJob(postCreateRequest.job());
// }

// PostType이 QUESTIONPOST인 경우 isResolve를 false로 초기화
if(postType == Post.PostType.QUESTIONPOST) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ public ResponseEntity<RsData<Void>> handle(ServiceException ex) {
);
}

// @ExceptionHandler(Exception.class)
// public ResponseEntity<RsData<Void>> handle(Exception ex) {
// log.error("Unhandled exception occurred", ex);
// Sentry.captureException(ex);
//
// return new ResponseEntity<>(
// new RsData<>(
// "500-1",
// "서버 오류가 발생했습니다."
// ),
// INTERNAL_SERVER_ERROR
// );
// }
@ExceptionHandler(Exception.class)
public ResponseEntity<RsData<Void>> handle(Exception ex) {
log.error("Unhandled exception occurred", ex);
Sentry.captureException(ex);

return new ResponseEntity<>(
new RsData<>(
"500-1",
"서버 오류가 발생했습니다."
),
INTERNAL_SERVER_ERROR
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void createPost_practicePost_mentor_success() {
assertThat(savedPost.getPostType()).isEqualTo(Post.PostType.PRACTICEPOST);
assertThat(savedPost.getTitle()).isEqualTo("실무경험");
assertThat(savedPost.getContent()).isEqualTo("실무내용");
assertThat(savedPost.getJob()).isEqualTo("백엔드");
//assertThat(savedPost.getJob()).isEqualTo("백엔드");
assertThat(savedPost.getMember()).isEqualTo(mentor);
}

Expand Down