fix(register): вернуть ОБЯЗАТЕЛЬНОЕ поле Telegram (снёс лишнее — просили убрать только телефон)

Ошибка прошлой правки: убрал всё поле контакта, а Юрий просил убрать ТОЛЬКО телефон.
Возвращаю поле Telegram, теперь ОБЯЗАТЕЛЬНОЕ: фронт+бэк требуют непустой telegram (400
без него), уходит оператору в TG-алерт, в БД НЕ хранится. bump 2026-07-23h. +2 теста
(telegram обязателен / в алерте не в БД), 4 существующих тела дополнены telegram.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
anor
2026-07-23 19:39:23 +10:00
co-authored by Claude Opus 4.8
parent aa0e0bc152
commit d70c3705ce
6 changed files with 46 additions and 24 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ def test_verify_endpoint_grants_bonus_and_audits(client_env, monkeypatch):
db.create_invite("http-tok", "hinv@x.ru")
r = client.post("/api/register", json={
"email": "hreg@x.ru", "password": "secret1", "invite": "http-tok",
"consent": True})
"telegram": "@hreg", "consent": True})
assert r.status_code == 200
with sqlite3.connect(os.environ["DB_PATH"]) as c:
code = c.execute("SELECT verify_code FROM users WHERE email='hreg@x.ru'").fetchone()[0]