This commit is contained in:
Your Name 2024-12-01 20:37:10 +03:00
parent e5711a508e
commit f76d59ccea
2 changed files with 2 additions and 3 deletions

3
api.py
View File

@ -1,5 +1,6 @@
from fastapi import FastAPI, HTTPException from fastapi import FastAPI, HTTPException
from pydantic import BaseModel from pydantic import BaseModel
from typing import Optional
from datetime import datetime, timedelta from datetime import datetime, timedelta
from statistics import median from statistics import median
from uuid import uuid4 from uuid import uuid4
@ -449,8 +450,6 @@ def get_time(it: Get_time2cdm):
else: else:
return 'Error' return 'Error'
from typing import Optional
class Get_stat(BaseModel): class Get_stat(BaseModel):
token: str token: str
date: Optional[str] = datetime.today().strftime('%Y-%m-%d') date: Optional[str] = datetime.today().strftime('%Y-%m-%d')

View File

@ -5,7 +5,7 @@ from time import time
# Отключение логирования для уменьшения нагрузки # Отключение логирования для уменьшения нагрузки
import logging import logging
#logging.disable(logging.CRITICAL) logging.disable(logging.CRITICAL)
# Fix 3.3 + 0.15 = 3.4499999999999997 # Fix 3.3 + 0.15 = 3.4499999999999997
from decimal import Decimal as d from decimal import Decimal as d