api access refactored

This commit is contained in:
2020-07-14 22:27:13 +02:00
parent 5052e2b60e
commit 7cd3802bf7
13 changed files with 17 additions and 16 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ export default {
},
// get authors
getAuthors ({ dispatch, commit, state }) {
return REST.get(`/corpus`, {})
return REST.get(`${apipath}/corpus`, {})
// .then(({ data }) => {
// console.log('corpus getAuthors REST: data', data)
// commit('setAuthors', data.content)
@@ -70,7 +70,7 @@ export default {
// get editionslist
getEditionsList ({ dispatch, commit, state }, authors) {
return Promise.all(authors.map(function (author) {
return REST.get(`/corpus/` + author.uuid, {})
return REST.get(`${apipath}/corpus/` + author.uuid, {})
.then(({ data }) => {
console.log('corpus getEditionsList REST: author, data', author, data)
// work arround
+1 -1
View File
@@ -41,7 +41,7 @@ export default {
}
// console.log('Search getResults params', params);
let q = qs.stringify(params)
return REST.get(`/search?` + q)
return REST.get(`${apipath}/search?` + q)
.then(({ data }) => {
console.log('search REST: data', data)
commit('setIsloading', false)