Compare commits

...

2 Commits

Author SHA1 Message Date
Jimmy 62be2d30f3 print json 2022-02-21 02:25:35 +00:00
Jimmy 0c113739ee Remove json request 2022-02-21 02:25:20 +00:00
2 changed files with 3 additions and 1 deletions

View File

@ -5,8 +5,8 @@ from fastapi.exceptions import HTTPException
async def auth_hook(request: Request):
try:
json = await request.json()
text = await request.body()
except:
raise HTTPException(status_code=204, detail="Missing or bad content")
header_signature = request.headers.get('X-Hub-Signature')

View File

@ -9,6 +9,8 @@ app.openapi = custom_openapi(app)
@app.get("/", dependencies=[Depends(auth_web)])
@app.post("/", dependencies=[Depends(auth_hook)])
async def hook(req: Request):
json = await req.json()
print(json)
return "Update"