mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
removed console.log
This commit is contained in:
parent
fda42721d9
commit
323376ed90
1 changed files with 17 additions and 25 deletions
|
@ -99,32 +99,26 @@ function* sendLoginRequestSaga({
|
||||||
}
|
}
|
||||||
|
|
||||||
function* refreshUser() {
|
function* refreshUser() {
|
||||||
try {
|
const {
|
||||||
const {
|
error,
|
||||||
error,
|
data: { user }
|
||||||
data: { user }
|
}: IResultWithStatus<{ user: IUser }> = yield call(
|
||||||
}: IResultWithStatus<{ user: IUser }> = yield call(
|
reqWrapper,
|
||||||
reqWrapper,
|
apiAuthGetUser
|
||||||
apiAuthGetUser
|
);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
yield put(
|
||||||
|
authSetUser({
|
||||||
|
...EMPTY_USER,
|
||||||
|
is_user: false
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (error) {
|
return;
|
||||||
yield put(
|
|
||||||
authSetUser({
|
|
||||||
...EMPTY_USER,
|
|
||||||
is_user: false
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
yield put(authSetUser({ ...user, is_user: true }));
|
|
||||||
} catch (e) {
|
|
||||||
console.log("erro", e);
|
|
||||||
} finally {
|
|
||||||
console.log("ended");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yield put(authSetUser({ ...user, is_user: true }));
|
||||||
}
|
}
|
||||||
|
|
||||||
function* checkUserSaga({ key }: RehydrateAction) {
|
function* checkUserSaga({ key }: RehydrateAction) {
|
||||||
|
@ -328,8 +322,6 @@ function* patchUser({ user }: ReturnType<typeof authPatchUser>) {
|
||||||
return yield put(authSetProfile({ patch_errors: data.errors }));
|
return yield put(authSetProfile({ patch_errors: data.errors }));
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log({ me, data });
|
|
||||||
|
|
||||||
yield put(authSetUser({ ...me, ...data.user }));
|
yield put(authSetUser({ ...me, ...data.user }));
|
||||||
yield put(authSetProfile({ user: { ...me, ...data.user }, tab: "profile" }));
|
yield put(authSetProfile({ user: { ...me, ...data.user }, tab: "profile" }));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue