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
+3 -3
View File
@@ -126,7 +126,7 @@ export default {
console.log('texts this.$route', this.$route)
// http://localhost:8984/texts/gdpSauval1724/toc
// get the edition's toc
REST.get(`/texts/` + this.$route.params.id + `/toc`, {})
REST.get(`${apipath}/texts/` + this.$route.params.id + `/toc`, {})
.then(({ data }) => {
console.log('texts/toc REST: data', data)
this.meta = data.meta
@@ -194,7 +194,7 @@ export default {
}),
getTextContent (textid, $state = null, direction = 'next') {
console.log('getTextContent', textid)
REST.get(`/items/${textid}`, {})
REST.get(`${apipath}/items/${textid}`, {})
.then(({ data }) => {
console.log('text REST: data', data)
if (direction === 'next') {
@@ -248,7 +248,7 @@ export default {
},
getIndexItem (item) {
this.indexitem = 'loading'
REST.get(`/index${item.index.charAt(0).toUpperCase()}${item.index.slice(1)}/${item.uuid}`, {})
REST.get(`${apipath}/index${item.index.charAt(0).toUpperCase()}${item.index.slice(1)}/${item.uuid}`, {})
.then(({ data }) => {
console.log('index tooltip REST: data', data)
if (this.indexitem === 'loading') {