X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6a5b173cd4e9f325f371d26204dfe156d911c20..f239b9e88677d82a48b6b565ab2fd407d1171729:/src/store/auth/auth-action.ts diff --git a/src/store/auth/auth-action.ts b/src/store/auth/auth-action.ts index e9930a0283..8b268cce5d 100644 --- a/src/store/auth/auth-action.ts +++ b/src/store/auth/auth-action.ts @@ -4,8 +4,9 @@ import { ofType, default as unionize, UnionOf } from "unionize"; import { Dispatch } from "redux"; -import { authService } from "../../services/services"; import { User } from "../../models/user"; +import { RootState } from "../store"; +import { ServiceRepository } from "../../services/services"; export const authActions = unionize({ SAVE_API_TOKEN: ofType(), @@ -19,9 +20,9 @@ export const authActions = unionize({ value: 'payload' }); -export const getUserDetails = () => (dispatch: Dispatch): Promise => { +export const getUserDetails = () => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise => { dispatch(authActions.USER_DETAILS_REQUEST()); - return authService.getUserDetails().then(details => { + return services.authService.getUserDetails().then(details => { dispatch(authActions.USER_DETAILS_SUCCESS(details)); return details; });