Skip to content

Commit

Permalink
Merge pull request #83 from BLACKPINK-SLJY/dev
Browse files Browse the repository at this point in the history
fix: bookmark 한 문제들 최신순
  • Loading branch information
thisIsJooS authored Jul 14, 2023
2 parents 4276ad1 + eaa561c commit 631ee60
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -236,8 +237,9 @@ public List<QuestionDto> getMyAnsweredQuestionsByCategory(String categoryString,

@Transactional
public List<QuestionDto> getMyBookmarkedAllQuestion(Member member) {

return getQuestionDtosFromQuestions(questionRepository.getMyBookmarkedQuestions(member, BookmarkStatus.Y), member);
List<QuestionDto> questionDtosFromQuestions = getQuestionDtosFromQuestions(questionRepository.getMyBookmarkedQuestions(member, BookmarkStatus.Y), member);
Collections.reverse(questionDtosFromQuestions);
return questionDtosFromQuestions;
}

@Transactional
Expand All @@ -254,8 +256,9 @@ public List<QuestionDto> getMyBookmarkedQuestionsByCategory(String categoryStrin
if(questions.isEmpty()){
return new ArrayList<>();
}

return getQuestionDtosFromQuestions(questions, member);
List<QuestionDto> questionDtosFromQuestions = getQuestionDtosFromQuestions(questions, member);
Collections.reverse(questionDtosFromQuestions);
return questionDtosFromQuestions;
}

public List<QuestionDto> getRandomQuestions(String categoryString, Member member) {
Expand Down

0 comments on commit 631ee60

Please sign in to comment.