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
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

View File

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