mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 23:25:31 +08:00
fixes flow error
This commit is contained in:
parent
a6ea56540f
commit
d324ea3c12
2 changed files with 2 additions and 2 deletions
|
@ -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 });
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue