🔧 User 모델 ID 필드명 수정
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
Some checks failed
SonarQube Analysis / SonarQube Scan (push) Has been cancelled
- id → user_id (실제 User 모델의 primary key) - 모든 참조를 user_id로 통일 - 회원가입 완전 수정 완료
This commit is contained in:
@@ -88,14 +88,14 @@ async def signup_request(
|
||||
|
||||
# 가입 사유 저장 (notes 컬럼 활용)
|
||||
if signup_data.reason:
|
||||
update_notes = text("UPDATE users SET notes = :reason WHERE id = :user_id")
|
||||
db.execute(update_notes, {"reason": signup_data.reason, "user_id": new_user.id})
|
||||
update_notes = text("UPDATE users SET notes = :reason WHERE user_id = :user_id")
|
||||
db.execute(update_notes, {"reason": signup_data.reason, "user_id": new_user.user_id})
|
||||
db.commit()
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"message": "회원가입 요청이 전송되었습니다. 관리자 승인 후 이용 가능합니다.",
|
||||
"user_id": new_user.id,
|
||||
"user_id": new_user.user_id,
|
||||
"username": new_user.username,
|
||||
"status": "pending_approval"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user