diff options
| author | taehoon <th.dev91@gmail.com> | 2019-04-11 15:46:44 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-04-22 11:17:01 -0400 |
| commit | f2f3fa81d8b2a077c104702680479671938037c6 (patch) | |
| tree | d7b1b82c5fb675decae88efda6499e3c330a9ae3 /src/modules/users.js | |
| parent | c8f967d5c0424c7dd504ad4afeaefb7c745eed31 (diff) | |
refer searched user objects from the global user rep
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index c98e353a..adcab233 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -1,4 +1,5 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' +import userSearchApi from '../services/new_api/user_search.js' import { compact, map, each, merge, last, concat, uniq } from 'lodash' import { set } from 'vue' import { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js' @@ -341,6 +342,14 @@ const users = { store.commit('setUserForNotification', notification) }) }, + searchUsers (store, query) { + // TODO: Move userSearch api into api.service + return userSearchApi.search({query, store: { state: store.rootState }}) + .then((users) => { + store.commit('addNewUsers', users) + return users + }) + }, async signUp (store, userInfo) { store.commit('signUpPending') |
