Merge master branch
[arvados.git] / src / components / api-token / api-token.tsx
index b6616d38bf4942ad5d8442b29fb02ad8de95c608..7656bf873368308f93947d943342d8de3c1471d5 100644 (file)
@@ -23,8 +23,10 @@ class ApiToken extends React.Component<ApiTokenProps & RouteProps & DispatchProp
         const search = this.props.location ? this.props.location.search : "";
         const apiToken = ApiToken.getUrlParameter(search, 'api_token');
         this.props.dispatch(authActions.SAVE_API_TOKEN(apiToken));
-        this.props.dispatch(authService.getUserDetails());
-        this.props.dispatch(projectService.getProjectList());
+        this.props.dispatch<any>(authService.getUserDetails()).then(() => {
+            const rootUuid = authService.getRootUuid();
+            this.props.dispatch(projectService.getProjectList(rootUuid));
+        });
     }
     render() {
         return <Redirect to="/"/>;