diff options
| author | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-19 11:32:40 +0300 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@gmail.com> | 2017-06-19 11:32:40 +0300 |
| commit | 3785a863cb27af18fe91403189eff16f662dc2d0 (patch) | |
| tree | ff1ee977f74e9516fec4ca0691b017ce6f7867ff /src/modules/api.js | |
| parent | 143aa3b990c0e0fac98c4a097d68e9f7518f1940 (diff) | |
| parent | 8e5d17a659b157f095ad3850ac3cdd2e537ac38b (diff) | |
Update branch and fix conflicts.
Diffstat (limited to 'src/modules/api.js')
| -rw-r--r-- | src/modules/api.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/api.js b/src/modules/api.js index a32adfde..e61382eb 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -1,4 +1,5 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' +import {isArray} from 'lodash' const api = { state: { @@ -18,9 +19,17 @@ const api = { }, actions: { startFetching (store, timeline) { + let userId = false + + // This is for user timelines + if (isArray(timeline)) { + userId = timeline[1] + timeline = timeline[0] + } + // Don't start fetching if we already are. if (!store.state.fetchers[timeline]) { - const fetcher = store.state.backendInteractor.startFetching({timeline, store}) + const fetcher = store.state.backendInteractor.startFetching({timeline, store, userId}) store.commit('addFetcher', {timeline, fetcher}) } }, |
