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

update search endpoint env variable

parent bd74da6f
No related branches found
No related tags found
No related merge requests found
VUE_APP_SEARCH_ENDPOINT='https://oda.uib.no/opal/api/'
NODE_ENV=production
VUE_APP_API_STAGE=dev
VUE_APP_ARTICLE_ENDPOINT='https://oda.uib.no/opal/dev/'
VUE_APP_SEARCH_ENDPOINT='https://oda.uib.no/opal/dev/api/'
VUE_APP_API_STAGE=dev
VUE_APP_ARTICLE_ENDPOINT='https://oda.uib.no/opal/dev/'
VUE_APP_SEARCH_ENDPOINT='https://oda.uib.no/opal/dev/api/'
VUE_APP_VERSION_LABEL=LOCAL
VUE_APP_RELEASE=test
NODE_ENV=production
VUE_APP_VERSION_LABEL=Beta
VUE_APP_API_STAGE=prod
VUE_APP_ARTICLE_ENDPOINT='https://oda.uib.no/opal/prod/'
VUE_APP_SEARCH_ENDPOINT='https://oda.uib.no/opal/prod/api/'
......@@ -96,7 +96,7 @@
this.items.push({q: q, label: q, time: time, search: search})
}
let self = this
self.api.get('suggest?', {params: {q: q, dict: self.get_lang(), n: 80, scope: 'w', stage: self.$parent.stage}})
self.api.get('suggest?', {params: {q: q, dict: self.get_lang(), n: 80, scope: 'w'}})
.then(async (response) => {
if (self.$refs.autocomplete.searchInput == q & self.suggesting) {
......
......@@ -78,7 +78,6 @@ import { setup } from 'axios-cache-adapter'
const SEARCH_ENDPOINT = process.env.VUE_APP_SEARCH_ENDPOINT
const ARTICLE_ENDPOINT= process.env.VUE_APP_ARTICLE_ENDPOINT
const API_STAGE = process.env.VUE_APP_API_STAGE
const dicts = {'nob': 'Nynorskorboka',
'bob': 'Bokmålsordboka',
......@@ -163,7 +162,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", stage: self.stage}}).then((response) => {
api.get('articles?', {params: {w: query.match || query.q, dict: self.lang, scope: "w"}}).then((response) => {
let article_ids = response.data
let unwrapped = []
for (const d in article_ids) {
......@@ -239,7 +238,6 @@ export default {
monthly_bm: null,
monthly_nn: null,
event: null,
stage: API_STAGE
}
},
computed: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment