diff --git a/index.html b/index.html
index c3e117b..f9c7d4b 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
+ data-base_url="https://dev-archive.hangar.org">
diff --git a/src/components/archiveList.vue b/src/components/archiveList.vue
index 8438cd7..bd46469 100644
--- a/src/components/archiveList.vue
+++ b/src/components/archiveList.vue
@@ -15,7 +15,10 @@ This file is part of ArciveList.
@@ -43,7 +46,7 @@ export default {
},
mounted() {
var self = this;
- axios.get(this.endpoint +'/sites', {
+ axios.get(this.api_endpoint +'/sites', {
})
.then(function (response) {
console.log(response.data)
@@ -54,13 +57,17 @@ export default {
});
},
methods: {
-
+ site_url: function(slug) {
+ return this.base_url + '/s/' + slug
+ }
},
watched: {
},
computed: {
-
+ api_endpoint: function() {
+ return this.base_url + '/api'
+ },
}
};
diff --git a/src/loaders/archiveListLoader.js b/src/loaders/archiveListLoader.js
index aef4430..b93280f 100644
--- a/src/loaders/archiveListLoader.js
+++ b/src/loaders/archiveListLoader.js
@@ -30,7 +30,7 @@ document.querySelectorAll("[data-vue-component=archive-list]")
new ComponentClass({
components: {'ArchiveList': ArchiveList},
propsData: { ...element.dataset },
- props: ["endpoint"],
+ props: ["base_url"],
/*
store: store,
i18n: i18n,