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:
AutonetSellCar Deploy
2026-01-01 19:33:24 +09:00
parent c0ceade463
commit ca20a099a2

View File

@@ -185,8 +185,11 @@ async def send_preregister_email_code(
db: Session = Depends(get_db)
):
"""Send email verification code for new registration (no login required)"""
# Check if email is already registered
existing = db.query(User).filter(User.email == request.email).first()
# Check if email is already registered (삭제된 사용자는 제외)
existing = db.query(User).filter(
User.email == request.email,
User.deleted_at.is_(None) # 삭제되지 않은 사용자만 체크
).first()
if existing:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,