forked from openlp/openlp
Merge branch 'api-return-on-empty-search' into 'master'
Always return a list when searching in the API Closes web-remote#1 See merge request openlp/openlp!156
This commit is contained in:
commit
4a667c77fc
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_bible():
|
def search_bible():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_views.route('/live', methods=['POST'])
|
@v2_views.route('/live', methods=['POST'])
|
||||||
|
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_view():
|
def search_view():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_custom.route('/add', methods=['POST'])
|
@v2_custom.route('/add', methods=['POST'])
|
||||||
|
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_view():
|
def search_view():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_images.route('/add', methods=['POST'])
|
@v2_images.route('/add', methods=['POST'])
|
||||||
|
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_view():
|
def search_view():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_media.route('/add', methods=['POST'])
|
@v2_media.route('/add', methods=['POST'])
|
||||||
|
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_view():
|
def search_view():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_presentations.route('/add', methods=['POST'])
|
@v2_presentations.route('/add', methods=['POST'])
|
||||||
|
@ -61,9 +61,7 @@ def add(id):
|
|||||||
def search_view():
|
def search_view():
|
||||||
text = request.args.get('text', '')
|
text = request.args.get('text', '')
|
||||||
result = search(text)
|
result = search(text)
|
||||||
if result:
|
return jsonify(result)
|
||||||
return jsonify(result)
|
|
||||||
return '', 400
|
|
||||||
|
|
||||||
|
|
||||||
@v2_songs.route('/add', methods=['POST'])
|
@v2_songs.route('/add', methods=['POST'])
|
||||||
|
Loading…
Reference in New Issue
Block a user