X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/09c61f87d52388ebfe97f478d536f4f194755401..aa45c97670b9726e7afe66c3e747ccab4b82fa6d:/src/store/auth/auth-action.ts diff --git a/src/store/auth/auth-action.ts b/src/store/auth/auth-action.ts index a6e6f797..e9930a02 100644 --- a/src/store/auth/auth-action.ts +++ b/src/store/auth/auth-action.ts @@ -7,7 +7,7 @@ import { Dispatch } from "redux"; import { authService } from "../../services/services"; import { User } from "../../models/user"; -const actions = unionize({ +export const authActions = unionize({ SAVE_API_TOKEN: ofType(), LOGIN: {}, LOGOUT: {}, @@ -20,13 +20,11 @@ const actions = unionize({ }); export const getUserDetails = () => (dispatch: Dispatch): Promise => { - dispatch(actions.USER_DETAILS_REQUEST()); + dispatch(authActions.USER_DETAILS_REQUEST()); return authService.getUserDetails().then(details => { - dispatch(actions.USER_DETAILS_SUCCESS(details)); + dispatch(authActions.USER_DETAILS_SUCCESS(details)); return details; }); }; - -export type AuthAction = UnionOf; -export default actions; +export type AuthAction = UnionOf;