this is another dirty sync commit

This commit is contained in:
Vri 🌈 2023-06-08 18:32:58 +02:00
parent bb22d1a728
commit 455ef5c1d5
Signed by: vrifox
GPG key ID: D40098E5B60B2197
2 changed files with 18 additions and 6 deletions

View file

@ -1,18 +1,30 @@
<script lang="ts"> <script lang="ts">
interface Paper {
url: string
}
export default { export default {
created() {
this.fetchData()
},
data() { data() {
return { return {
apiUri: this.appUri, apiUri: 'https://raw.githubusercontent.com/CodeforLeipzig/stadtratmonitor/master/input.json',
papers: null,
} }
}, },
methods: { methods: {
async fetchData() { async fetchData() {
this.papers = await (await fetch(this.apiUri)).json()
} }
} },
} }
</script> </script>
<template> <template>
<ul>
<li v-for="paper in papers">
<a :href="paper.url">{{ paper.name }}</a>
</li>
</ul>
</template> </template>

View file

@ -7,7 +7,7 @@ const app = createApp(App)
app.config.globalProperties = { app.config.globalProperties = {
...app.config.globalProperties, ...app.config.globalProperties,
apiUri: 'https://jsonplaceholder.typicode.com/posts/', apiUri: 'https://joergreichert.de/srm/input.json',
applicationName: 'Stadtratmonitor', applicationName: 'Stadtratmonitor',
menuEntries: { menuEntries: {
0: { 0: {
@ -22,7 +22,7 @@ app.config.globalProperties = {
name: 'Glossar', name: 'Glossar',
uri: '/glossar' uri: '/glossar'
} }
}, },
} }
app.mount('#app') app.mount('#app')