Skip to content

Commit

Permalink
Merge pull request #626 from bounswe/backend/bugfix/611-backend-retur…
Browse files Browse the repository at this point in the history
…n-difficulty-of-questions-in-searchquestions-and-getquestionbyid

Fix question related endpoints to retrieve difficulty level.
  • Loading branch information
EnesBaserr authored Dec 6, 2024
2 parents 199e6a0 + d5a3cec commit dce3fb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.group1.programminglanguagesforum.DTOs.Responses;

import com.group1.programminglanguagesforum.Entities.DifficultyLevel;
import lombok.*;

import java.util.ArrayList;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit dce3fb9

Please sign in to comment.