Spaces:
Sleeping
Sleeping
John Landry
commited on
Commit
•
448b36e
1
Parent(s):
564a1be
update
Browse files- __pycache__/main.cpython-310.pyc +0 -0
- main.py +5 -13
__pycache__/main.cpython-310.pyc
CHANGED
Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ
|
|
main.py
CHANGED
@@ -11,16 +11,6 @@ app = FastAPI()
|
|
11 |
def ok():
|
12 |
return 'all is good!'
|
13 |
|
14 |
-
@app.get('/hello')
|
15 |
-
def hello():
|
16 |
-
print('hello log')
|
17 |
-
return {'hello': 'world'}
|
18 |
-
|
19 |
-
@app.webhooks.post("whatsappmsg")
|
20 |
-
def get_entities(request: Request):
|
21 |
-
print(request)
|
22 |
-
return f"INPUT: {request.body}"
|
23 |
-
|
24 |
@app.get("/webook")
|
25 |
async def verify(
|
26 |
verify_token: str = Query(alias="hub.verify_token"),
|
@@ -39,7 +29,9 @@ async def verify(
|
|
39 |
return "bad challenge"
|
40 |
|
41 |
@app.post("/webook")
|
42 |
-
async def
|
43 |
-
print(
|
44 |
-
|
|
|
|
|
45 |
|
|
|
11 |
def ok():
|
12 |
return 'all is good!'
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
@app.get("/webook")
|
15 |
async def verify(
|
16 |
verify_token: str = Query(alias="hub.verify_token"),
|
|
|
29 |
return "bad challenge"
|
30 |
|
31 |
@app.post("/webook")
|
32 |
+
async def callback(request: Request):
|
33 |
+
print("callback is being called")
|
34 |
+
print(f"HEADERS [{request.headers}]")
|
35 |
+
print(f"BODY [{await request.body()}]")
|
36 |
+
return {"status": "success"}
|
37 |
|