devZenaight commited on
Commit
d4fe86e
·
verified ·
1 Parent(s): 39068f2

Upload 5 files

Browse files
Files changed (1) hide show
  1. main.py +7 -0
main.py CHANGED
@@ -55,6 +55,13 @@ async def receive_update(req: Request):
55
 
56
  return JSONResponse({"status": "replied"})
57
 
 
 
 
 
 
 
 
58
  @app.get("/ping") # health check
59
  def ping():
60
  return {"pong": True}
 
55
 
56
  return JSONResponse({"status": "replied"})
57
 
58
+ @app.post("/send")
59
+ async def check_token():
60
+ token = os.getenv("WHATSAPP_API_TOKEN", "")
61
+ if token:
62
+ return {"token_loaded": True}
63
+ raise HTTPException(status_code=400, detail="Token not found")
64
+
65
  @app.get("/ping") # health check
66
  def ping():
67
  return {"pong": True}