first commit

This commit is contained in:
2025-07-24 20:13:47 +03:00
commit 94b7585f8b
175 changed files with 85264 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import time
from fastapi.responses import JSONResponse
from app.utils.logger_util import logger
def response(data: dict, start_time: float, code: int = 200) -> dict:
speed = time.time() - start_time
data["duration"] = speed
logger.debug(f"RESPONSE TIME: {speed}s")
if code != 200:
return JSONResponse(content=data, status_code=code)
return data