diff --git a/backend/src/main/java/com/group1/programminglanguagesforum/DTOs/Responses/GetQuestionDetailsResponseDto.java b/backend/src/main/java/com/group1/programminglanguagesforum/DTOs/Responses/GetQuestionDetailsResponseDto.java index e72ae89b..4e18f6b4 100644 --- a/backend/src/main/java/com/group1/programminglanguagesforum/DTOs/Responses/GetQuestionDetailsResponseDto.java +++ b/backend/src/main/java/com/group1/programminglanguagesforum/DTOs/Responses/GetQuestionDetailsResponseDto.java @@ -1,5 +1,6 @@ package com.group1.programminglanguagesforum.DTOs.Responses; +import com.group1.programminglanguagesforum.Entities.DifficultyLevel; import lombok.*; import java.util.ArrayList; @@ -18,6 +19,7 @@ public class GetQuestionDetailsResponseDto { private Long dislikeCount; private Long commentCount; private Boolean selfQuestion; + private DifficultyLevel difficulty; private Integer selfVoted; private String createdAt; @Builder.Default diff --git a/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java b/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java index cf9404cf..c45141e5 100644 --- a/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java +++ b/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java @@ -110,6 +110,7 @@ public GetQuestionDetailsResponseDto getQuestion(Long id) throws NoSuchElementEx .id(question.getId()) .title(question.getTitle()) .content(question.getQuestionBody()) + .difficulty(question.getDifficulty()) .likeCount(question.getUpvoteCount()) .dislikeCount(question.getDownvoteCount()) .commentCount(question.getCommentCount())