mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-04 07:26:40 +07:00
fixed token checking
This commit is contained in:
parent
9c436d348c
commit
48cf0b93ee
4 changed files with 25 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
import { createStore, applyMiddleware, combineReducers, compose, Store } from 'redux';
|
||||
import { applyMiddleware, combineReducers, compose, createStore, Store } from 'redux';
|
||||
|
||||
import { persistStore, persistReducer } from 'redux-persist';
|
||||
import { persistReducer, persistStore } from 'redux-persist';
|
||||
import storage from 'redux-persist/lib/storage';
|
||||
import createSagaMiddleware from 'redux-saga';
|
||||
|
||||
|
@ -8,15 +8,15 @@ import { createBrowserHistory } from 'history';
|
|||
import { editorLocationChanged } from '~/redux/editor/actions';
|
||||
import { PersistConfig, Persistor } from 'redux-persist/es/types';
|
||||
|
||||
import { userReducer, IRootReducer } from '~/redux/user';
|
||||
import { IRootReducer, userReducer } from '~/redux/user';
|
||||
import { userSaga } from '~/redux/user/sagas';
|
||||
|
||||
import { editor, IEditorState } from '~/redux/editor';
|
||||
import { editorSaga } from '~/redux/editor/sagas';
|
||||
|
||||
import { map, IMapReducer } from '~/redux/map';
|
||||
import { IMapReducer, map } from '~/redux/map';
|
||||
import { mapSaga } from '~/redux/map/sagas';
|
||||
import { watchLocation, getLocation } from '~/utils/window';
|
||||
import { watchLocation } from '~/utils/window';
|
||||
import { LatLngLiteral } from 'leaflet';
|
||||
import { setUserLocation, userLogout } from './user/actions';
|
||||
import { MainMap } from '~/constants/map';
|
||||
|
|
|
@ -77,6 +77,7 @@ function* authCheckSaga({ key }: RehydrateAction) {
|
|||
data: { user, random_url },
|
||||
}: Unwrap<typeof checkUserToken> = yield call(checkUserToken, {
|
||||
id,
|
||||
token,
|
||||
});
|
||||
|
||||
if (user) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue