Use opensearch for suggestions api.

This commit is contained in:
Kavin 2022-07-02 13:34:45 +01:00
parent cbedbd0626
commit 89bcb549cc
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -47,9 +47,11 @@ export default {
} }
}, },
async refreshSuggestions() { async refreshSuggestions() {
this.searchSuggestions = await this.fetchJson(this.apiUrl() + "/suggestions", { this.searchSuggestions = (
query: this.searchText, await this.fetchJson(this.apiUrl() + "/opensearch/suggestions", {
}); query: this.searchText,
})
)?.[1];
this.searchSuggestions.unshift(this.searchText); this.searchSuggestions.unshift(this.searchText);
this.setSelected(0); this.setSelected(0);
}, },