Skip to content

feat: 백준 ID 중복 검증 필터 적용#58

Merged
starboxxxx merged 1 commit intodevelopfrom
feature/#57
Dec 23, 2025
Merged

feat: 백준 ID 중복 검증 필터 적용#58
starboxxxx merged 1 commit intodevelopfrom
feature/#57

Conversation

@starboxxxx
Copy link
Contributor

🍀 이슈 번호


✅ 작업 사항

  • Backend 서버에서 응답에 isUsed를 추가하여 해당 백준 ID를 가진 회원이 있는지 조회 후 결과 반환
  • Frontend에서는 해당 값 핸들링 후 결과 반환

⌨ 기타

@starboxxxx starboxxxx requested a review from tkv00 December 23, 2025 09:53
@starboxxxx starboxxxx self-assigned this Dec 23, 2025
@starboxxxx starboxxxx added the ✨ feat 새로운 기능 추가, 기존 기능을 요구 사항에 맞추어 수정 label Dec 23, 2025
@gemini-code-assist
Copy link

Summary of Changes

Hello @starboxxxx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자 회원가입 과정에서 백준 ID 검증 기능을 강화합니다. 기존에는 백준 ID의 유효성만 확인했지만, 이제는 해당 ID가 이미 다른 사용자에 의해 등록되었는지 여부도 함께 검사합니다. 이를 통해 중복 계정 생성을 방지하고, 사용자에게 더욱 명확한 피드백을 제공하여 가입 경험을 개선하는 것이 목표입니다.

Highlights

  • 백준 ID 중복 검증 추가: 회원가입 시 백준 ID의 유효성뿐만 아니라, 해당 ID가 이미 사용 중인지 여부를 검증하는 로직이 추가되었습니다.
  • 프론트엔드 응답 처리 개선: 백엔드 API 응답에 새로 추가된 'isUsed' 필드를 프론트엔드에서 처리하여, 중복된 백준 ID에 대한 적절한 오류 메시지를 사용자에게 제공합니다.
  • 오류 메시지 세분화: 유효하지 않은 백준 ID와 이미 사용 중인 백준 ID에 대해 각각 다른 오류 메시지를 표시하도록 개선되었습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 PR은 백준 ID 중복 검증 로직을 추가하는 내용이네요. API 응답에 isUsed 필드를 추가하고, 프론트엔드에서 이를 처리하여 사용자에게 ID 유효성 및 중복 여부를 명확하게 알려주는 점이 좋습니다. 코드 변경 사항을 검토했으며, 가독성과 유지보수성을 높일 수 있는 작은 리팩토링 제안을 하나 드립니다.

Comment on lines +33 to +48
const { isBaekjoonId, isUsed } = res.data;

if (!isBaekjoonId) {
setIsIdChecked(false);
setIdErrorMessage("입력하신 백준 ID가 올바르지 않습니다");
return;
}

if (isUsed) {
setIsIdChecked(false);
setIdErrorMessage("이미 가입된 백준 ID입니다");
return;
}

setIsIdChecked(true);
setIdErrorMessage("");

Choose a reason for hiding this comment

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

medium

ID 유효성 검사 로직이 여러 if 문과 return 문으로 분리되어 있어 약간 복잡해 보입니다. isIdChecked 상태를 한 번에 설정하고, if-else if-else 구문을 사용하여 오류 메시지를 관리하면 코드가 더 간결하고 이해하기 쉬워질 것 같습니다. 이렇게 하면 상태 업데이트 로직과 UI 메시지 설정 로직이 분리되어 유지보수성도 향상됩니다.

      const { isBaekjoonId, isUsed } = res.data;
      const isIdValidAndUnused = isBaekjoonId && !isUsed;

      setIsIdChecked(isIdValidAndUnused);

      if (!isBaekjoonId) {
        setIdErrorMessage("입력하신 백준 ID가 올바르지 않습니다");
      } else if (isUsed) {
        setIdErrorMessage("이미 가입된 백준 ID입니다");
      } else {
        setIdErrorMessage("");
      }

@starboxxxx starboxxxx merged commit e046903 into develop Dec 23, 2025
2 checks passed
@starboxxxx starboxxxx deleted the feature/#57 branch December 23, 2025 10:02
marulog added a commit that referenced this pull request Dec 25, 2025
@swthewhite swthewhite linked an issue Jan 1, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능 추가, 기존 기능을 요구 사항에 맞추어 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 백준 ID 중복 검증 필터 적용

1 participant