From 1823d6ae1b2827c914b31534cb71d522c3740a4d Mon Sep 17 00:00:00 2001 From: EnesBaserr Date: Sat, 7 Dec 2024 18:04:46 +0300 Subject: [PATCH] Fix endpoint naming --- .../DTOs/Responses/GetQuestionDetailsResponseDto.java | 2 +- .../programminglanguagesforum/Services/QuestionService.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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 f90b45af..e327118e 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 @@ -33,7 +33,7 @@ public class GetQuestionDetailsResponseDto { @Builder.Default private boolean bookmarked = false; @Builder.Default - private DifficultyLevel lastRatedDifficulty =null; + private DifficultyLevel selfDifficultyVote =null; private Long easyCount; private Long mediumCount; private Long hardCount; 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 ceb6969d..66454e12 100644 --- a/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java +++ b/backend/src/main/java/com/group1/programminglanguagesforum/Services/QuestionService.java @@ -115,7 +115,7 @@ public GetQuestionDetailsResponseDto getQuestion(Long id) throws NoSuchElementEx .title(question.getTitle()) .content(question.getQuestionBody()) .difficulty(question.getDifficulty()) - .lastRatedDifficulty(lastRatedDifficulty) + .selfDifficultyVote(lastRatedDifficulty) .likeCount(question.getUpvoteCount()) .dislikeCount(question.getDownvoteCount()) .commentCount(question.getCommentCount()) @@ -124,7 +124,6 @@ public GetQuestionDetailsResponseDto getQuestion(Long id) throws NoSuchElementEx .easyCount(easyCount) .mediumCount(mediumCount) .hardCount(hardCount) - .lastRatedDifficulty(lastRatedDifficulty) .createdAt(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(question.getCreatedAt())) .updatedAt(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(question.getUpdatedAt())) .author(AuthorDto.builder()