wacca: tiny cleanup
This commit is contained in:
parent
2274b42358
commit
cb009f6e23
@ -98,9 +98,7 @@ class WaccaServlet(BaseServlet):
|
||||
async def render_POST(self, request: Request) -> bytes:
|
||||
def end(resp: Dict) -> bytes:
|
||||
hash = md5(json.dumps(resp, ensure_ascii=False).encode()).digest()
|
||||
j_Resp = Response(json.dumps(resp, ensure_ascii=False))
|
||||
j_Resp.raw_headers.append((b"X-Wacca-Hash", hash.hex().encode()))
|
||||
return j_Resp
|
||||
return Response(content=json.dumps(resp, ensure_ascii=False), headers={"X-Wacca-Hash": hash.hex()})
|
||||
|
||||
api = request.path_params.get('api', '')
|
||||
branch = request.path_params.get('branch', '')
|
||||
|
Loading…
Reference in New Issue
Block a user