mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
backend: fixed loading of routes
This commit is contained in:
parent
b8431abeeb
commit
cc4dff0ca1
10 changed files with 73 additions and 74 deletions
|
@ -242,15 +242,24 @@ function* sendSaveRequestSaga({ title, address, force }) {
|
|||
return yield put(setSaveSuccess({ address: result.address, save_error: TIPS.SAVE_SUCCESS, title }));
|
||||
}
|
||||
|
||||
function* refreshUserData() {
|
||||
const user = yield select(getUser);
|
||||
const data = yield call(checkUserToken, user);
|
||||
|
||||
return yield put(setUser(data));
|
||||
}
|
||||
|
||||
function* setSaveSuccessSaga({ address, title }) {
|
||||
const { id } = yield select(getUser);
|
||||
|
||||
pushPath(`/${address}/edit`);
|
||||
yield put(setTitle(title));
|
||||
yield put(setAddress(address));
|
||||
// yield editor.setAddress(address);
|
||||
|
||||
yield editor.owner = id;
|
||||
|
||||
yield call(refreshUserData);
|
||||
|
||||
return yield editor.setInitialData();
|
||||
}
|
||||
|
||||
|
@ -353,7 +362,6 @@ function* locationChangeSaga({ location }) {
|
|||
|
||||
function* gotVkUserSaga({ user }) {
|
||||
const data = yield call(checkUserToken, user);
|
||||
|
||||
yield put(setUser(data));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue