adds component endpoint variable

This commit is contained in:
buttle 2021-10-22 12:35:42 +02:00
parent 3d8d6264db
commit 5cfebf5ef0
3 changed files with 11 additions and 11 deletions

View File

@ -5,7 +5,8 @@
</head>
<body>
<div data-vue-component="archive-list">
<div data-vue-component="archive-list"
data-endpoint="https://dev-archive.hangar.org/api">
</div>
<script src="/dist/archive-list.js"></script>

View File

@ -43,12 +43,11 @@ export default {
},
mounted() {
var self = this;
axios.get('https://dev-archive.hangar.org/api/sites', {
axios.get(this.endpoint +'/sites', {
})
.then(function (response) {
console.log(response.data)
self.sites = response.data
//self.$forceUpdate();
})
.catch(function (error) {
console.log(error);

View File

@ -29,9 +29,9 @@ document.querySelectorAll("[data-vue-component=archive-list]")
.forEach((element) => {
new ComponentClass({
components: {'ArchiveList': ArchiveList},
/*
propsData: { ...element.dataset },
props: ["endpoint", "language", "csrf_token"],
props: ["endpoint"],
/*
store: store,
i18n: i18n,
*/