summaryrefslogtreecommitdiff
path: root/app/main.py
diff options
context:
space:
mode:
authortycfuvgibhoinjok <aneuhmanh@gmail.com>2026-03-31 13:46:18 +0300
committertycfuvgibhoinjok <aneuhmanh@gmail.com>2026-03-31 13:46:18 +0300
commit7e41576035cd9f0004255a7490e6691c6d989ff6 (patch)
tree4d78369f54b32c9f72bcc137b41f1cc0172f30fc /app/main.py
parent051f562c6ceafe8f25e10548bd8f5543839794e5 (diff)
add jwt
Diffstat (limited to 'app/main.py')
-rw-r--r--app/main.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/app/main.py b/app/main.py
index 8b7d6eb..d2925ed 100644
--- a/app/main.py
+++ b/app/main.py
@@ -3,7 +3,7 @@ import time
from fastapi import FastAPI
from sqlalchemy import text
-from app.routes.routes import router as api_router
+from app.routes import router as api_router
from app.utils.create_tables import init_db
from app.utils.db import engine
from app.utils.logger_cfg import logger
@@ -65,22 +65,3 @@ async def read_root():
logger.info("Root endpoint accessed")
logger.debug("Processing root endpoint request")
return {"message": "Hello new asyncpg ci!"}
-
-
-@app.get("/check-db")
-async def check_db():
- logger.info("Database health check endpoint called")
- logger.debug("Starting database health check")
-
- try:
- async with engine.begin() as conn:
- logger.debug("Executing test query: SELECT 1")
- result = await conn.execute(text("SELECT 1"))
- db_result = result.scalar()
- logger.info(f"Database health check successful: {db_result}")
- logger.debug("Database health check query executed successfully")
- return {"db_check": db_result}
-
- except Exception as e:
- logger.exception(f"Database health check failed: {e}")
- raise