Реализованы задачи бэклога 1-5 (1я не до конца)
This commit is contained in:
@@ -63,6 +63,7 @@ REQUIRED_SETTINGS = {
|
||||
"auth.password.enabled",
|
||||
"otp.phone.max_send_attempts_per_24h",
|
||||
"otp.phone.min_seconds_between_attempts",
|
||||
"otp.phone.max_verify_attempts",
|
||||
"operator.call.phone",
|
||||
"consent.personal_data.required",
|
||||
"consent.personal_data.document_url",
|
||||
@@ -182,9 +183,7 @@ def device_snapshot(device: Any) -> dict[str, str | None]:
|
||||
return {
|
||||
"platform": device.platform,
|
||||
"app_version": device.app_version,
|
||||
"device_id_hash": (
|
||||
hashlib.sha256(device.device_id.encode()).hexdigest() if device.device_id else None
|
||||
),
|
||||
"device_id": device.device_id,
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +234,7 @@ async def bootstrap(
|
||||
user_id = (await session.execute(statement)).scalar_one()
|
||||
await session.execute(
|
||||
insert(ClientProfile)
|
||||
.values(id=uuid.uuid4(), user_id=user_id)
|
||||
.values(id=uuid.uuid4(), user_id=user_id, russian_phone=principal.phone_number)
|
||||
.on_conflict_do_nothing(index_elements=[ClientProfile.user_id])
|
||||
)
|
||||
for consent_type in ("personal_data", "user_agreement", "marketing"):
|
||||
@@ -300,7 +299,7 @@ async def record_consents(
|
||||
device = {
|
||||
"platform": ux_session.platform,
|
||||
"app_version": ux_session.app_version,
|
||||
"device_id_hash": ux_session.device_id_hash,
|
||||
"device_id": ux_session.device_id,
|
||||
}
|
||||
now = datetime.now(UTC)
|
||||
versions: dict[str, str] = {}
|
||||
@@ -366,7 +365,7 @@ async def start_session(
|
||||
start_reason=body.start_reason,
|
||||
platform=body.device.platform,
|
||||
app_version=body.device.app_version,
|
||||
device_id_hash=device["device_id_hash"],
|
||||
device_id=device["device_id"],
|
||||
started_at=now,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user