fixes flow error

This commit is contained in:
zmagod 2017-10-18 16:28:19 +02:00
parent a6ea56540f
commit d324ea3c12
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ class SettingsTeam extends Component<Props, State> {
(this: any).props.tabState("2");
const { id } = this.props.match.params;
if(id) {
getTeamDetails(id).then(response => {
getTeamDetails(parseInt(id)).then(response => {
const { team, users } = response;
(this: any).setState({ users, team });
});

View file

@ -3,7 +3,7 @@ import type { NewTeam } from "flow-typed";
import { axiosInstance } from "./config";
import { TEAM_DETAILS_PATH, TEAMS_PATH } from "./endpoints";
export const getTeamDetails = (teamID: string): Promise<*> => {
export const getTeamDetails = (teamID: number): Promise<*> => {
const path = TEAM_DETAILS_PATH.replace(":team_id", teamID);
return axiosInstance.get(path).then(({ data }) => data.team_details);
};