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

Move stage to end of api call

parent 2129a2c8
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
this.items.push({q: q, match: q, label: q+" ", time: time, search: search}) this.items.push({q: q, match: q, label: q+" ", time: time, search: search})
} }
let self = this let self = this
self.api.get('suggest?', {params: {q: q, dict: self.$parent.lang, n: 80, scope: 'w'}}) self.api.get('suggest?', {params: {q: q, dict: self.$parent.lang, n: 80, scope: 'w', stage: self.$parent.API_STAGE}})
.then(async (response) => { .then(async (response) => {
if (self.$refs.autocomplete.searchInput == q & self.suggesting) { if (self.$refs.autocomplete.searchInput == q & self.suggesting) {
......
...@@ -85,7 +85,6 @@ const dicts = {'nob': 'Nynorskorboka', ...@@ -85,7 +85,6 @@ const dicts = {'nob': 'Nynorskorboka',
const api = setup({ const api = setup({
baseURL: SEARCH_ENDPOINT, baseURL: SEARCH_ENDPOINT,
params: {stage: API_STAGE},
cache: { cache: {
maxAge: 15 * 60 * 1000, maxAge: 15 * 60 * 1000,
exclude: { exclude: {
...@@ -158,7 +157,7 @@ function navigate_to_query(self, word) { ...@@ -158,7 +157,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"}}).then((response) => { api.get('articles?', {params: {w: query.match || query.q, dict: self.lang, scope: "w", stage: API_STAGE}}).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) {
......
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