Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] 질문 생성 시 랜덤 키워드 선택 수정 #125

Merged
merged 3 commits into from
Aug 26, 2024
Merged

Conversation

minwoo0419
Copy link
Contributor

Related issue 🛠

Work Description ✏️

  • 가장 최근에 만들어진 질문의 키워드만 가져와서 그 키워드가 아닌 랜덤 키워드를 반환하도록 하였습니다.
  • 무한 루프가 걸릴 수 있기 때문에 사용자의 키워드가 하나만 있다면 그것을 바로 반환해주었습니다.
  • 이로인해 사용하지 않는 함수들을 제거해주었습니다.

Uncompleted Tasks 😅

  • Task1

To Reviewers 📢

Comment on lines +120 to +126
if (keywords.size() == 1)
return keywords.get(0);
String alreadyKeyword = questionRetriever.findFirstByProfile(profile).getKeyword();
Random random = new Random();
int i = random.nextInt(keywords.size());
while(alreadyKeyword.equals(keywords.get(i))){
i = random.nextInt(keywords.size());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

키워드 하나일 때도 확인하신 꼼꼼함 칭찬드립니다~

@minwoo0419 minwoo0419 merged commit a062aec into develop Aug 26, 2024
1 check passed
@minwoo0419 minwoo0419 deleted the fix/124 branch August 26, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] 질문 생성 시 랜덤 키워드 선택 수정
2 participants