mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
25 lines
589 B
JavaScript
25 lines
589 B
JavaScript
import { communityInfo } from '../graphql/queries'
|
|
|
|
export const getCommunityInfoMixin = {
|
|
methods: {
|
|
getCommunityInfo() {
|
|
if (this.$store.state.community.name === '') {
|
|
this.$apollo
|
|
.query({
|
|
query: communityInfo,
|
|
})
|
|
.then((result) => {
|
|
this.$store.commit('community', result.data.getCommunityInfo)
|
|
return result.data.getCommunityInfo
|
|
})
|
|
.catch((error) => {
|
|
this.toastError(error.message)
|
|
})
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
this.getCommunityInfo()
|
|
},
|
|
}
|