fetch data from localhost/allCaches

This commit is contained in:
Timo Volkmann 2019-03-23 11:36:02 +01:00
parent 77d6a849a6
commit 9001b6d733
2 changed files with 15 additions and 12 deletions

5
.gitignore vendored
View File

@ -24,7 +24,10 @@ labswp_2019_sose_geocaching.iml
# public folder # public folder
src/main/resources/public/ src/main/resources/public/
.idea/ # .idea/
# nicht notwendig. alle problematischen files sind draußen.
# wenns trotzdem noch probleme macht muss man die entsprechenden
# files noch mit "git rm --cached <file> untracken.
# Gradle # Gradle

View File

@ -45,7 +45,7 @@ export default {
denseOn: true, denseOn: true,
filter: '', filter: '',
selected: [], selected: [],
todos: [], caches: [],
columns: [ columns: [
{ {
name: 'desc', name: 'desc',
@ -61,14 +61,14 @@ export default {
{ name: 'title', label: 'Titel', field: 'title' }, { name: 'title', label: 'Titel', field: 'title' },
{ name: 'completed', label: 'Komplett', field: 'completed' }, { name: 'completed', label: 'Komplett', field: 'completed' },
], ],
data: [ // data: [
{ // {
"userId": 1, // "userId": 1,
"id": 1, // "id": 1,
"title": "delectus aut autem", // "title": "delectus aut autem",
"completed": false // "completed": false
} // }
] // ]
} }
}, },
@ -78,9 +78,9 @@ export default {
methods: { methods: {
fetchTodos () { fetchTodos () {
this.$axios.get('https://jsonplaceholder.typicode.com/todos') this.$axios.get('http://localhost:8080/allCaches')
.then((response) => { .then((response) => {
this.todos = response.data; this.caches = response.data;
}) })
} }
} }