1
0
mirror of synced 2024-11-27 23:40:48 +01:00

wacca: tiny cleanup

This commit is contained in:
Hay1tsme 2024-11-14 12:39:21 -05:00
parent 2274b42358
commit cb009f6e23

View File

@ -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', '')