use serializer.encode instead of json.dumps

This commit is contained in:
ArabCoders 2023-11-03 15:57:15 +03:00
parent caca271e19
commit 72b7447c78

View file

@ -137,11 +137,11 @@ async def history(request):
history = { 'done': [], 'queue': []}
for _ ,v in dqueue.queue.saved_items():
history['queue'].append(vars(v))
history['queue'].append(v)
for _ ,v in dqueue.done.saved_items():
history['done'].append(vars(v))
history['done'].append(v)
return web.Response(text=json.dumps(history))
return web.Response(text=serializer.encode(history))
@sio.event
async def connect(sid, environ):