akkoma-fe/src/components/follow_requests/follow_requests.js
2018-06-07 01:24:31 +00:00

23 lines
480 B
JavaScript

import UserCard from '../user_card/user_card.vue'
const FollowRequests = {
components: {
UserCard
},
created () {
this.updateRequests()
},
computed: {
requests () {
return this.$store.state.api.followRequests
}
},
methods: {
updateRequests () {
this.$store.state.api.backendInteractor.fetchFollowRequests()
.then((requests) => { this.$store.commit('setFollowRequests', requests) })
}
}
}
export default FollowRequests