X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/e5b901f7d6f87b56f43d3dbe002c9c90a3d41349..f626dd268140b4ef406a2ec0c6568f6ca0298e1d:/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;