Fix: users.geburtstag Migration + Format TT.MM statt MM-DD
- database.py: ALTER TABLE users ADD COLUMN geburtstag TEXT (fehlte!)
- profile.py: Validierung auf \d{2}\.\d{2} (TT.MM Format)
- settings.js: Placeholder/Pattern auf TT.MM geändert
- worlds.js: Birthday-Check auf DD.MM Format angepasst
SW by-v1029, APP_VER 1029
This commit is contained in:
parent
a4377033ec
commit
b54d9fda99
7 changed files with 16 additions and 10 deletions
|
|
@ -68,8 +68,8 @@ async def update_profile(data: ProfileUpdate, user=Depends(get_current_user)):
|
|||
if "social_link" in fields and len(fields["social_link"]) > 120:
|
||||
raise HTTPException(400, "social_link darf maximal 120 Zeichen lang sein.")
|
||||
if "geburtstag" in fields and fields["geburtstag"]:
|
||||
if not re.fullmatch(r"\d{2}-\d{2}", fields["geburtstag"]):
|
||||
raise HTTPException(400, "geburtstag muss im Format MM-DD sein (z.B. 03-15).")
|
||||
if not re.fullmatch(r"\d{2}\.\d{2}", fields["geburtstag"]):
|
||||
raise HTTPException(400, "geburtstag muss im Format TT.MM sein (z.B. 16.05).")
|
||||
|
||||
if not fields:
|
||||
return _load_user(user["id"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue