From 4fb218be56f73737bdeb7229147360b1b3d289c6 Mon Sep 17 00:00:00 2001 From: kermit Date: Mon, 14 Sep 2020 16:32:18 +0100 Subject: [PATCH] Pass ack back on search --- server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 35e24eb..bd55766 100644 --- a/server.py +++ b/server.py @@ -233,7 +233,9 @@ def logout(): @socketio.on('mainSearch') def mainSearch(data): if data['term'].strip() != "": - emit('mainSearch', app.mainSearch(session['dz'], data['term'])) + result = app.mainSearch(session['dz'], data['term']) + result['ack'] = data.get('ack') + emit('mainSearch', result) @socketio.on('search') @@ -241,6 +243,7 @@ def search(data): if data['term'].strip() != "": result = app.search(session['dz'], data['term'], data['type'], data['start'], data['nb']) result['type'] = data['type'] + result['ack'] = data.get('ack') emit('search', result)