Compare commits
2 Commits
a04f24fcff
...
62be2d30f3
Author | SHA1 | Date | |
---|---|---|---|
62be2d30f3 | |||
0c113739ee |
@@ -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')
|
||||
|
@@ -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"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user