Set tslint semicolon rule and aply it to the project
[arvados.git] / src / components / api-token / api-token.tsx
index bc0caf56dff4e976a2952e185c3cf766f607001a..b6616d38bf4942ad5d8442b29fb02ad8de95c608 100644 (file)
@@ -5,7 +5,8 @@
 import { Redirect, RouteProps } from "react-router";
 import * as React from "react";
 import { connect, DispatchProp } from "react-redux";
-import authActions, { getUserDetails } from "../../store/auth-action";
+import authActions from "../../store/auth/auth-action";
+import { authService, projectService } from "../../services/services";
 
 interface ApiTokenProps {
 }
@@ -16,16 +17,17 @@ class ApiToken extends React.Component<ApiTokenProps & RouteProps & DispatchProp
         const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
         const results = regex.exec(search);
         return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
-    };
+    }
 
     componentDidMount() {
         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(getUserDetails());
+        this.props.dispatch(authService.getUserDetails());
+        this.props.dispatch(projectService.getProjectList());
     }
     render() {
-        return <Redirect to="/"/>
+        return <Redirect to="/"/>;
     }
 }