Quick Search: Queries containing equal sign (=) failed
This commit is contained in:
parent
1c0476699a
commit
82071bf922
@ -49,13 +49,12 @@ def search_nodes():
|
|||||||
result = queries.do_node_search(searchword, terms, page_idx, project_id)
|
result = queries.do_node_search(searchword, terms, page_idx, project_id)
|
||||||
return jsonify(result)
|
return jsonify(result)
|
||||||
|
|
||||||
@blueprint_search.route('/multisearch', methods=['GET'])
|
@blueprint_search.route('/multisearch', methods=['POST'])
|
||||||
def multi_search_nodes():
|
def multi_search_nodes():
|
||||||
import json
|
|
||||||
if len(request.args) != 1:
|
if len(request.args) != 1:
|
||||||
log.info(f'Expected 1 argument, received {len(request.args)}')
|
log.info(f'Expected 1 argument, received {len(request.args)}')
|
||||||
|
|
||||||
json_obj = json.loads([a for a in request.args][0])
|
json_obj = request.json
|
||||||
q = []
|
q = []
|
||||||
for row in json_obj:
|
for row in json_obj:
|
||||||
q.append({
|
q.append({
|
||||||
|
@ -44,7 +44,13 @@ export class MultiSearch {
|
|||||||
|
|
||||||
thenExecute() {
|
thenExecute() {
|
||||||
let data = JSON.stringify(this.getAllParams());
|
let data = JSON.stringify(this.getAllParams());
|
||||||
let rawAjax = $.getJSON(this.apiUrl, data);
|
let rawAjax = $.ajax({
|
||||||
|
url: this.apiUrl,
|
||||||
|
type: 'POST',
|
||||||
|
data: data,
|
||||||
|
dataType: 'json',
|
||||||
|
contentType: 'application/json; charset=UTF-8'
|
||||||
|
});
|
||||||
let prettyPromise = rawAjax.then(this.parseResult.bind(this));
|
let prettyPromise = rawAjax.then(this.parseResult.bind(this));
|
||||||
prettyPromise['abort'] = rawAjax.abort.bind(rawAjax); // Hack to be able to abort the promise down the road
|
prettyPromise['abort'] = rawAjax.abort.bind(rawAjax); // Hack to be able to abort the promise down the road
|
||||||
return prettyPromise;
|
return prettyPromise;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user