Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -66,6 +66,10 @@ async def post_to_gas_raw(raw_body: str, content_type: str) -> Tuple[int, str]:
|
|
| 66 |
return (0, f"Error posting to GAS: {e}")
|
| 67 |
await asyncio.sleep(0.5)
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
@app.post("/echo")
|
| 70 |
async def echo(request: Request) -> Dict[str, Any]:
|
| 71 |
body_bytes = await request.body()
|
|
|
|
| 66 |
return (0, f"Error posting to GAS: {e}")
|
| 67 |
await asyncio.sleep(0.5)
|
| 68 |
|
| 69 |
+
@app.get("/ping")
|
| 70 |
+
async def ping():
|
| 71 |
+
return {"message": "pong"}
|
| 72 |
+
|
| 73 |
@app.post("/echo")
|
| 74 |
async def echo(request: Request) -> Dict[str, Any]:
|
| 75 |
body_bytes = await request.body()
|