Update main.py

This commit is contained in:
ilyastar9999
2025-12-04 14:12:27 +03:00
parent 47d3166f31
commit 8ab144796f

View File

@@ -34,6 +34,13 @@ async def verify_token(authorization: str = Header(None)):
raise HTTPException(status_code=403, detail="Invalid token") raise HTTPException(status_code=403, detail="Invalid token")
return token return token
# Database functions
async def get_db():
return await db_pool.acquire()
async def release_db(conn):
await db_pool.release(conn)
async def send_telegram_alert(message: str, service_id: int = None, service_name: str = None): async def send_telegram_alert(message: str, service_id: int = None, service_name: str = None):
"""Send alert to telegram bot""" """Send alert to telegram bot"""