Commit 41f818c0 authored by Aron Fiechter's avatar Aron Fiechter
Browse files

Keep track of whether last query was advanced or not

parent ac4d8cb4
......@@ -3,7 +3,9 @@ import config from '../config';
export async function sendQuery(query) {
const url = `${config.MIMIR_API.URL}/query`;
const fixedQuery = query.text ? { fields: [{ key: 'allData', value: query.text }] } : query;
const fixedQuery = query.text
? { fields: [{ key: 'allData', value: query.text }], advanced: false }
: { ...query, advanced: true };
const { data } = await axios.post(url, JSON.stringify(fixedQuery), {
headers: { 'Content-Type': 'application/json' },
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment