diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 916799ec06da8b99f29dcccb03eb48ee06a9b2d1..a9e6a4901b931c1b333f1c6f0237fc848d7ce3c1 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -88,6 +88,8 @@ const oda_api = setup({ var api_endpoint = process.env.VUE_APP_API_PREFIX + '/api/dict' +var oda_dev = 'https://oda.uib.no/opal/dev' + function compare_by_hgno(lemma_text) { return function(art1, art2) { let lemma1 = art1.lemmas.filter(lemma => lemma.lemma == lemma_text)[0] @@ -109,7 +111,7 @@ function navigate_to_article(self, source) { if ((self.$route.query.nocache || '').toLowerCase() == 'true') { config.headers.cachebuster = Date.now() } - axios.get(api_endpoint + '/' + self.$route.params.lang + '/article/' + self.$route.params.id, config) + axios.get(oda_dev + '/' + self.$route.params.lang + '/article/' + self.$route.params.id, config) .then(function(response){ self.article = Object.assign(response.data, {'dictionary': self.$route.params.lang, source: source, results: self.search_results}) self.search_results = [] @@ -200,7 +202,7 @@ export default { return (this.waiting_for_articles || this.waiting_for_metadata) && this.$route.name != 'root' }, api_pref: function() { - return api_endpoint + '/' + this.lang + '/article/' + return oda_dev + '/' + this.lang + '/article/' }, get_oda_api: function() { return oda_api @@ -230,7 +232,7 @@ export default { let self = this Promise.all(unwrapped.map((article) => { - return axios.get(`${api_endpoint}/${article.dictionary}/article/${article.id}`) + return axios.get(`${oda_dev}/${article.dictionary}/article/${article.id}.json`) })) .then((response) => { @@ -339,11 +341,11 @@ export default { } // words of the month - axios.get(api_endpoint + '/bob/article/5607').then(function(response){ + axios.get(oda_dev + '/bob/article/5607.json').then(function(response){ self.monthly_bm = Object.assign(response.data, {dictionary: 'bob'}) }) - axios.get(api_endpoint + '/nob/article/78569').then(function(response){ + axios.get(oda_dev + '/nob/article/78569.json').then(function(response){ self.monthly_nn = Object.assign(response.data, {dictionary: 'nob'}) }) }).catch(function(_){