From ff4f73874a44564a65e564d26f8cf4d75ceddbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E6=B2=89?= Date: Sun, 14 Apr 2024 17:27:10 +0800 Subject: [PATCH] app register callback --- server/routers/github.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/routers/github.py b/server/routers/github.py index a6a113dd..88fd2477 100644 --- a/server/routers/github.py +++ b/server/routers/github.py @@ -95,6 +95,7 @@ def github_app_callback(code: str, installation_id: str, setup_action: str): return { "success": success, "message": message } @router.post("/app/webhook") -def github_app_webhook(request: Request, background_tasks: BackgroundTasks, x_github_event: str = Header(...)): - logger.info("github_app_webhook: x_github_event=%s, %s", x_github_event, request.json()) +async def github_app_webhook(request: Request, background_tasks: BackgroundTasks, x_github_event: str = Header(...)): + payload = await request.body() + logger.info("github_app_webhook: x_github_event=%s, %s", x_github_event, payload) return {"hello": "world"}