result array reverse, remove async from created und methods getPendingCreations

This commit is contained in:
ogerly 2021-12-02 12:11:45 +01:00
parent 297c892e57
commit ab86e95d17

View File

@ -68,14 +68,14 @@ export default {
this.$store.commit('openCreationsMinus', 1) this.$store.commit('openCreationsMinus', 1)
} }
}, },
async getPendingCreations() { getPendingCreations() {
this.$apollo this.$apollo
.query({ .query({
query: getPendingCreations, query: getPendingCreations,
}) })
.then((result) => { .then((result) => {
this.$store.commit('resetOpenCreations') this.$store.commit('resetOpenCreations')
this.confirmResult = result.data.getPendingCreations this.confirmResult = result.data.getPendingCreations.reverse()
this.$store.commit('setOpenCreations', result.data.getPendingCreations.length) this.$store.commit('setOpenCreations', result.data.getPendingCreations.length)
}) })
.catch((error) => { .catch((error) => {
@ -83,8 +83,9 @@ export default {
}) })
}, },
}, },
async created() { created() {
await this.getPendingCreations() alert('neu laden')
this.getPendingCreations()
}, },
} }
</script> </script>