aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow_requests/follow_requests.js
blob: 11a228aa4b592884dd0ba3215d1032aae353028c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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