remove client subscription freeze / keep admin subscription toggle / update admin button labels

Made-with: Cursor
This commit is contained in:
Vladless
2026-03-19 01:40:23 +03:00
parent 3a304afc49
commit 352bc22be2
41 changed files with 882 additions and 700 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ from utils.telegram_login import verify_telegram_login
router = APIRouter(prefix="/auth", tags=["Auth"])
TOKEN_TTL_HINT = "бессрочно" if API_TOKEN_TTL_DAYS is None else f"{API_TOKEN_TTL_DAYS} дн."
TELEGRAM_LOGIN_MAX_AGE = 86400 # 24 часа
TELEGRAM_LOGIN_MAX_AGE = 86400
@router.post("/register", response_model=RegisterResponse)
@@ -66,7 +66,7 @@ async def login(
_LOGIN_CODES: dict[str, tuple[str, float]] = {}
_LOGIN_CODE_TTL = 600.0 # 10 min
_LOGIN_CODE_TTL = 600.0
def _clean_login_codes() -> None:
-1
View File
@@ -210,7 +210,6 @@ def _parse_date_range(
return start, end
except ValueError as e:
raise HTTPException(status_code=400, detail=f"Неверный формат дат: {e}")
# по умолчанию — вчера
end = datetime.now(tz).replace(hour=0, minute=0, second=0, microsecond=0)
start = end - timedelta(days=1)
return start, end