Skip to content
Snippets Groups Projects
Commit 6f3c1244 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

Keep old api for search

parent 87efadaf
No related branches found
No related tags found
No related merge requests found
...@@ -137,7 +137,7 @@ function navigate_to_article(self, source) { ...@@ -137,7 +137,7 @@ function navigate_to_article(self, source) {
} }
function navigate_to_search(self, query) { 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){ .then(function(response){
self.search_results = response.data self.search_results = response.data
if (! self.search_results.length) { if (! self.search_results.length) {
...@@ -162,7 +162,7 @@ function navigate_to_search(self, query) { ...@@ -162,7 +162,7 @@ function navigate_to_search(self, query) {
} }
function navigate_to_word(self, word) { 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){ .then(function(response){
self.search_results = response.data.filter(result => result.match == word).sort(compare_by_hgno(word)) self.search_results = response.data.filter(result => result.match == word).sort(compare_by_hgno(word))
if (! self.search_results.length) { if (! self.search_results.length) {
...@@ -207,6 +207,9 @@ export default { ...@@ -207,6 +207,9 @@ export default {
api_pref: function() { api_pref: function() {
return oda_dev + '/' + this.lang + '/article/' return oda_dev + '/' + this.lang + '/article/'
}, },
api_old: function() {
return api_endpoint + '/' + this.lang + '/article/'
},
get_oda_api: function() { get_oda_api: function() {
return oda_api return oda_api
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment