diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-25 23:34:24 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-28 12:41:20 -0500 |
| commit | 390b2bcfee4842ca10a53e036da7f1a1076042cb (patch) | |
| tree | 76fb2972555582ad13b29a4b1a070fa8796c10bd /src/components/follow_request_card/follow_request_card.js | |
| parent | 4b0a11acef6acbe3a1205568bffb077fab043b2a (diff) | |
Add FollowRequestCard component
Diffstat (limited to 'src/components/follow_request_card/follow_request_card.js')
| -rw-r--r-- | src/components/follow_request_card/follow_request_card.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/follow_request_card/follow_request_card.js b/src/components/follow_request_card/follow_request_card.js new file mode 100644 index 00000000..1a00a1c1 --- /dev/null +++ b/src/components/follow_request_card/follow_request_card.js @@ -0,0 +1,20 @@ +import BasicUserCard from '../basic_user_card/basic_user_card.vue' + +const FollowRequestCard = { + props: ['user'], + components: { + BasicUserCard + }, + methods: { + approveUser () { + this.$store.state.api.backendInteractor.approveUser(this.user.id) + this.$store.dispatch('removeFollowRequest', this.user) + }, + denyUser () { + this.$store.state.api.backendInteractor.denyUser(this.user.id) + this.$store.dispatch('removeFollowRequest', this.user) + } + } +} + +export default FollowRequestCard |
