From 7e41576035cd9f0004255a7490e6691c6d989ff6 Mon Sep 17 00:00:00 2001 From: tycfuvgibhoinjok Date: Tue, 31 Mar 2026 13:46:18 +0300 Subject: add jwt --- app/main.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'app/main.py') 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 -- cgit v1.3-3-g829e