mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-29 10:56:06 +00:00
Added blank search result check on backend
This commit is contained in:
parent
eb70f531f4
commit
59ed51e14f
|
@ -130,11 +130,13 @@ def logout():
|
||||||
|
|
||||||
@socketio.on('mainSearch')
|
@socketio.on('mainSearch')
|
||||||
def mainSearch(data):
|
def mainSearch(data):
|
||||||
|
if data['term'].strip() != "":
|
||||||
emit('mainSearch', app.mainSearch(session['dz'], data['term']))
|
emit('mainSearch', app.mainSearch(session['dz'], data['term']))
|
||||||
|
|
||||||
|
|
||||||
@socketio.on('search')
|
@socketio.on('search')
|
||||||
def search(data):
|
def search(data):
|
||||||
|
if data['term'].strip() != "":
|
||||||
result = app.search(session['dz'], data['term'], data['type'], data['start'], data['nb'])
|
result = app.search(session['dz'], data['term'], data['type'], data['start'], data['nb'])
|
||||||
result['type'] = data['type']
|
result['type'] = data['type']
|
||||||
emit('search', result)
|
emit('search', result)
|
||||||
|
|
Loading…
Reference in a new issue