Skip to content

Commit

Permalink
fix: 디비 에러 수정 (#64)
Browse files Browse the repository at this point in the history
* feat: 검색 기능 확장

* fix: nginx maxfilesize 변경

* feat: content type 반환

* feat: 사용자 정답 여부 반환

* fix: 데이터베이스 오류 해결
  • Loading branch information
Martin0o0 committed Nov 20, 2023
1 parent 0b25304 commit fe78642
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/teamh/khumon/domain/Question.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class Question extends BaseEntity {
// private MyAnswer myAnswer;

private String myAnswer;

@Column(columnDefinition = "TEXT")
private String whatWrong;
private Boolean isCorrect;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class QuestionInformation {
private Long id;
private String content;
private String myAnswer;
private boolean isCorrect;
private Boolean isCorrect;
private String whatWrong;
private String answer;
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public ResponseEntity<?> getLearningMaterial(Long id, Principal principal) {
.id(question.getId())
.content(question.getContent())
.myAnswer(question.getMyAnswer() == null ? null : question.getMyAnswer())
.isCorrect(question.getIsCorrect() != null && question.getIsCorrect())
.isCorrect(question.getIsCorrect() == null ? null : question.getIsCorrect())
.whatWrong(question.getWhatWrong() == null ? null : question.getWhatWrong())
.answer(question.getAnswer().getAnswer())
.build()).toList();
Expand Down

0 comments on commit fe78642

Please sign in to comment.