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

Merge branch 'hotfix_update_search_endpoint' into 'prod'

update search endpoint

See merge request spraksamlingane/beta.ordbok.uib.no!87
parents 3e884919 b2e83edc
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 NODE_ENV=production
VUE_APP_API_STAGE=dev
VUE_APP_ARTICLE_ENDPOINT='https://oda.uib.no/opal/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_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_VERSION_LABEL=LOCAL
VUE_APP_RELEASE=test VUE_APP_RELEASE=test
NODE_ENV=production NODE_ENV=production
VUE_APP_VERSION_LABEL=Beta VUE_APP_VERSION_LABEL=Beta
VUE_APP_API_STAGE=prod
VUE_APP_ARTICLE_ENDPOINT='https://oda.uib.no/opal/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 @@ ...@@ -96,7 +96,7 @@
this.items.push({q: q, label: q, time: time, search: search}) this.items.push({q: q, label: q, time: time, search: search})
} }
let self = this 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) => { .then(async (response) => {
if (self.$refs.autocomplete.searchInput == q & self.suggesting) { if (self.$refs.autocomplete.searchInput == q & self.suggesting) {
......
...@@ -78,7 +78,6 @@ import { setup } from 'axios-cache-adapter' ...@@ -78,7 +78,6 @@ import { setup } from 'axios-cache-adapter'
const SEARCH_ENDPOINT = process.env.VUE_APP_SEARCH_ENDPOINT const SEARCH_ENDPOINT = process.env.VUE_APP_SEARCH_ENDPOINT
const ARTICLE_ENDPOINT= process.env.VUE_APP_ARTICLE_ENDPOINT const ARTICLE_ENDPOINT= process.env.VUE_APP_ARTICLE_ENDPOINT
const API_STAGE = process.env.VUE_APP_API_STAGE
const dicts = {'nob': 'Nynorskorboka', const dicts = {'nob': 'Nynorskorboka',
'bob': 'Bokmålsordboka', 'bob': 'Bokmålsordboka',
...@@ -163,7 +162,7 @@ function navigate_to_query(self, word) { ...@@ -163,7 +162,7 @@ function navigate_to_query(self, word) {
let query = self.event ? self.event : {q: word} let query = self.event ? self.event : {q: word}
// Get article IDs // 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 article_ids = response.data
let unwrapped = [] let unwrapped = []
for (const d in article_ids) { for (const d in article_ids) {
...@@ -239,7 +238,6 @@ export default { ...@@ -239,7 +238,6 @@ export default {
monthly_bm: null, monthly_bm: null,
monthly_nn: null, monthly_nn: null,
event: null, event: null,
stage: API_STAGE
} }
}, },
computed: { computed: {
......
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