update deps, added logout clear store

This commit is contained in:
Alexander Wong
2018-01-21 12:01:59 -07:00
parent 3c5aa92840
commit 95d86161ec
14 changed files with 984 additions and 821 deletions

View File

@@ -9,9 +9,14 @@ import {
setFormEmail,
setFormPassword,
setFormPasswordConfirmation,
setFormOldPassword
setFormOldPassword,
setClearAuthState
} from "../actions/auth/reducer.actions";
import { setSelfUser } from "../actions/user/reducer.actions";
import {
setSelfUser,
setClearUserState
} from "../actions/user/reducer.actions";
import { setClearWorktypeState } from "../actions/worktype/reducer.actions";
import {
registerUser,
verifyEmail,
@@ -62,6 +67,9 @@ function* loginUserCall(postBody) {
}
function* logoutUserCall() {
yield effects.put(setClearAuthState());
yield effects.put(setClearUserState());
yield effects.put(setClearWorktypeState());
yield effects.call(logoutUser);
}

View File

@@ -11,7 +11,15 @@ import {
} from "../actions/user/reducer.actions";
import { getSelfUserRequest } from "../actions/user/saga.actions";
import { CLIENT_OR_PROVIDER_STEP } from "../constants/user.constants";
import { getSelfUser, createUserInfo, updateUserInfo, createClient, updateClient, createProvider, updateProvider } from "../api/user.api";
import {
getSelfUser,
createUserInfo,
updateUserInfo,
createClient,
updateClient,
createProvider,
updateProvider
} from "../api/user.api";
function* getSelfUserCall() {
yield effects.put(isSendingUserRequest(true));