feat: 댓글 익명화 + 전 경기 적용
- 이메일/투표 게이트 제거 → 완전 익명 - 세션 단위 발급(sessionStorage 캐싱) — 탭 닫으면/시크릿이면 새 닉
This commit is contained in:
1 parent
8a67094510
commit
b62bedc665
8 files changed
+132
-204
No files matched your search
@@ -122,10 +122,10 @@ class AdminSetResultIn(BaseModel):
|
||||
scoreB: int = Field(ge=0, le=50)
|
||||
|
||||
|
||||
# ── 댓글(경기별 한마디) ─────────────────────────────────────
|
||||
# ── 댓글(경기별 한마디) — 완전 익명 ─────────────────────────
|
||||
class CommentIn(BaseModel):
|
||||
deviceId: str = Field(min_length=8, max_length=64)
|
||||
email: EmailStr # 투표 시 입력한 이메일 — 마스킹해 닉네임으로 노출
|
||||
deviceId: str = Field(min_length=8, max_length=64) # 서버에서 해시 후 폐기(원본 비저장)
|
||||
nickname: str = Field(min_length=1, max_length=12) # 세션 캐싱된 닉(서버 풀 검증)
|
||||
body: str = Field(min_length=1, max_length=200)
|
||||
|
||||
@field_validator("body")
|
||||
@@ -138,11 +138,14 @@ class CommentIn(BaseModel):
|
||||
|
||||
|
||||
class CommentOut(BaseModel):
|
||||
id: int
|
||||
nickname: str # 마스킹된 이메일 (ab***@gmail.com)
|
||||
# id·author_hash 등 내부 식별자는 노출하지 않음(닉네임만 공개)
|
||||
nickname: str # 축구 코믹 한국어 5글자 (세션 발급)
|
||||
body: str
|
||||
createdAt: str # ISO8601
|
||||
mine: bool = False # 조회 요청 기기(device)가 작성한 댓글이면 True (삭제 버튼 노출용)
|
||||
|
||||
|
||||
class CommentNicknameOut(BaseModel):
|
||||
nickname: str # 세션 시작 시 발급받는 랜덤 닉(클라이언트가 sessionStorage에 캐싱)
|
||||
|
||||
|
||||
class CommentListOut(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user