- rebrand from 습관 트래커 to 해빗랩 across templates, manifest, service worker - add HTTPS redirect middleware for reverse-proxied deployments - add public landing page (/) and privacy policy page with real data handling disclosures - add in-app account deletion (Apple review requirement) - add Android TWA Digital Asset Links support (/.well-known/assetlinks.json) - add SFTP deployment script for the Synology-hosted server Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
503 B
Python
15 lines
503 B
Python
from sqlalchemy.orm import Session
|
|
|
|
from app.models.user import User
|
|
|
|
|
|
def delete_account(db: Session, user: User) -> None:
|
|
"""계정과 그에 딸린 모든 데이터를 삭제한다.
|
|
|
|
Habit/PushSubscription/HabitLog/HabitNotificationLog/SummaryNotificationLog는 전부
|
|
user.id 기준 DB 레벨 ON DELETE CASCADE로 연결돼 있어(마이그레이션 0004/0005 참고),
|
|
User 행만 지우면 나머지는 MariaDB가 알아서 정리한다.
|
|
"""
|
|
db.delete(user)
|
|
db.commit()
|