Use json_response helper
1 files changed, 1 insertions(+), 3 deletions(-) M main.py
M main.py => main.py +1 -3
@@ 25,9 25,7 @@ async def get_pack(request): 'z' + base58.b58encode(b'\x01\x55' + multihash.digest(sticker.image_data, 'sha2-512').encode()).decode('utf-8') ] }) result = web.Response(body=json.dumps(stickers).encode('utf-8')) result.headers['Content-Type'] = 'application/json' return result return web.json_response(stickers) async def get_sticker(request): pack_id = request.match_info.get('pack')