Sprint 14: User-Profil-System (bio, wohnort, erfahrung, avatar)
- DB-Migrationen: 7 neue Spalten in users (bio, wohnort, erfahrung, social_link, profil_sichtbarkeit, avatar_url, email_verified) - GET /api/auth/me gibt nun alle Profil-Felder + created_at zurück - PATCH /api/profile: Profil-Felder aktualisieren (mit Validierung) - POST /api/profile/avatar: Avatar-Upload (PIL JPEG-Konvertierung, HEIC-Support) - Router in main.py registriert
This commit is contained in:
parent
41c4ba3dd6
commit
9bd8701a1d
4 changed files with 134 additions and 7 deletions
|
|
@ -444,6 +444,14 @@ def _migrate(conn_factory):
|
|||
("users", "ban_reason", "TEXT"),
|
||||
# WebCal: Kalender-Abo-Token
|
||||
("users", "calendar_token", "TEXT"),
|
||||
# User-Profil-Felder
|
||||
("users", "email_verified", "INTEGER NOT NULL DEFAULT 0"),
|
||||
("users", "bio", "TEXT"),
|
||||
("users", "wohnort", "TEXT"),
|
||||
("users", "erfahrung", "TEXT"),
|
||||
("users", "social_link", "TEXT"),
|
||||
("users", "profil_sichtbarkeit", "TEXT NOT NULL DEFAULT 'public'"),
|
||||
("users", "avatar_url", "TEXT"),
|
||||
]
|
||||
with conn_factory() as conn:
|
||||
for table, column, col_type in migrations:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue