Skip to content

Commit

Permalink
Fix question related endpoints to retrieve difficulty level.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnesBaserr committed Dec 6, 2024
1 parent 06bf7b1 commit d5a3cec
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 d5a3cec

Please sign in to comment.