Update main.py
This commit is contained in:
@@ -34,6 +34,13 @@ async def verify_token(authorization: str = Header(None)):
|
||||
raise HTTPException(status_code=403, detail="Invalid 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):
|
||||
"""Send alert to telegram bot"""
|
||||
|
||||
Reference in New Issue
Block a user