File size: 583 Bytes
511ba56
b5fd72b
511ba56
 
 
 
 
 
 
 
 
8490d1b
 
511ba56
b5fd72b
 
 
511ba56
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from fastapi import FastAPI
from telegram_handlers import telegram_webhook, WebhookData
from utils import dns_test, test_ai_response

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hadhramout Bank AI Backend is Live"}

@app.post("/webhook")
async def webhook(data: WebhookData):
    return await telegram_webhook(data)

# @app.post("/test")
# async def test(data: WebhookData):
#     return await test_webhook(data)

@app.get("/dns-test")
async def dns():
    return await dns_test()

@app.get("/ai-test")
async def ai():
    return await test_ai_response()