diff options
| author | taehoon <th.dev91@gmail.com> | 2019-04-25 04:30:08 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-07-10 21:01:07 -0400 |
| commit | 646d197bf181eff7d0df268d5eda2debcda3f4fe (patch) | |
| tree | 4a81af0142e290026250680f0a4926ccb2370812 /src/modules/users.js | |
| parent | e9e6daa76e6adee236e643cc45deee0d2c7ee542 (diff) | |
mutate updated relationship to the store
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index f9b609b4..c7ebbc85 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -305,6 +305,14 @@ const users = { clearFollowers ({ commit }, userId) { commit('clearFollowers', userId) }, + subscribeUser ({ rootState, commit }, id) { + return rootState.api.backendInteractor.subscribeUser(id) + .then((relationship) => commit('updateUserRelationship', [relationship])) + }, + unsubscribeUser ({ rootState, commit }, id) { + return rootState.api.backendInteractor.unsubscribeUser(id) + .then((relationship) => commit('updateUserRelationship', [relationship])) + }, registerPushNotifications (store) { const token = store.state.currentUser.credentials const vapidPublicKey = store.rootState.instance.vapidPublicKey |
