mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 05:09:58 -05:00
Converting Search Suggetions to a Context. Search estimates is removed and suggestions is used instead.
This commit is contained in:
parent
57262442bd
commit
bbfe76890b
13 changed files with 101 additions and 208 deletions
|
|
@ -1003,22 +1003,6 @@ export async function fetchDecoded(vinNumber) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function searchEstimate(search_str, tagNames) {
|
||||
const body = {search_str: search_str, tag_names: tagNames};
|
||||
const response = await apiPost(`${API_URI}/search_estimate`, body);
|
||||
if (response.status === 200) {
|
||||
const content = await response.json();
|
||||
const zims = content['zims'];
|
||||
let zimSum = 0;
|
||||
zims.map(i => zimSum += i['estimate']);
|
||||
return {
|
||||
file_groups: content['file_groups'],
|
||||
zims: zims,
|
||||
zimSum: zimSum,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchSuggestions(search_str) {
|
||||
const body = {search_str: search_str};
|
||||
const response = await apiPost(`${API_URI}/search_suggestions`, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue