From 6f3c1244a2e9a4d3f255d9755c054e95cf2ec45c Mon Sep 17 00:00:00 2001 From: Henrik Askjer <henrik.askjer@uib.no> Date: Fri, 24 Sep 2021 15:20:48 +0200 Subject: [PATCH] Keep old api for search --- src/components/DictionaryView.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 18eb142..003322c 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -137,7 +137,7 @@ function navigate_to_article(self, source) { } function navigate_to_search(self, query) { - axios.get(self.api_pref + 'search?q=' + query) + axios.get(self.api_old + 'search?q=' + query) .then(function(response){ self.search_results = response.data if (! self.search_results.length) { @@ -162,7 +162,7 @@ function navigate_to_search(self, query) { } function navigate_to_word(self, word) { - axios.get(self.api_pref + 'suggest?q=' + word) + axios.get(self.api_old + 'suggest?q=' + word) .then(function(response){ self.search_results = response.data.filter(result => result.match == word).sort(compare_by_hgno(word)) if (! self.search_results.length) { @@ -207,6 +207,9 @@ export default { api_pref: function() { return oda_dev + '/' + this.lang + '/article/' }, + api_old: function() { + return api_endpoint + '/' + this.lang + '/article/' + }, get_oda_api: function() { return oda_api }, -- GitLab