Fix: 삭제된 사용자 이메일 인증 허용
- verification.py의 send-preregister 엔드포인트에서 deleted_at 체크 추가 - 삭제된 사용자가 동일 이메일로 재가입 가능하도록 수정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -185,8 +185,11 @@ async def send_preregister_email_code(
|
|||||||
db: Session = Depends(get_db)
|
db: Session = Depends(get_db)
|
||||||
):
|
):
|
||||||
"""Send email verification code for new registration (no login required)"""
|
"""Send email verification code for new registration (no login required)"""
|
||||||
# Check if email is already registered
|
# Check if email is already registered (삭제된 사용자는 제외)
|
||||||
existing = db.query(User).filter(User.email == request.email).first()
|
existing = db.query(User).filter(
|
||||||
|
User.email == request.email,
|
||||||
|
User.deleted_at.is_(None) # 삭제되지 않은 사용자만 체크
|
||||||
|
).first()
|
||||||
if existing:
|
if existing:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_400_BAD_REQUEST,
|
status_code=status.HTTP_400_BAD_REQUEST,
|
||||||
|
|||||||
Reference in New Issue
Block a user