diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue index 97d99d4dd7e414fb392ba6599acb6a65d4990c4d..776985511f8107540a80906c62e0ce399b37acb4 100644 --- a/src/components/Autocomplete.vue +++ b/src/components/Autocomplete.vue @@ -83,14 +83,15 @@ if (/_|\*|\|/.test(q)) { search = 2 } - this.items.splice(0,1, {q: q, match: q, label: q+" ", time: time, search: search}) + this.items.splice(0,1, {q: q, match: q, label: q, time: time, search: search}) } } else { + // Whitespace necessary in case option already exists in dropdown this.items.push({q: q, match: q, label: q+" ", time: time, search: search}) } let self = this - self.api.get('suggest?', {params: {q: q, dict: self.$parent.lang, n: 80, scope: 'w'}}) + self.api.get('suggest?', {params: {q: q, dict: self.$parent.lang, n: 80, scope: 'w', stage: self.$parent.stage}}) .then(async (response) => { if (self.$refs.autocomplete.searchInput == q & self.suggesting) { diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 3e04400820ef11ece9d2c88c398002c832d880d2..6612a8500f63e11d23bb49c64256a2e12762133e 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -85,7 +85,6 @@ const dicts = {'nob': 'Nynorskorboka', const api = setup({ baseURL: SEARCH_ENDPOINT, - params: {stage: API_STAGE}, cache: { maxAge: 15 * 60 * 1000, exclude: { @@ -158,7 +157,7 @@ function navigate_to_query(self, word) { let query = self.event ? self.event : {q: word} // Get article IDs - api.get('articles?', {params: {w: query.match || query.q, dict: self.lang, scope: "w"}}).then((response) => { + api.get('articles?', {params: {w: query.match || query.q, dict: self.lang, scope: "w", stage: self.stage}}).then((response) => { let article_ids = response.data let unwrapped = [] for (const d in article_ids) { @@ -225,7 +224,8 @@ export default { error: null, monthly_bm: null, monthly_nn: null, - event: null + event: null, + stage: API_STAGE } }, computed: {