Skip to content

Commit d5485ee

Browse files
round change working
1 parent 627fbb0 commit d5485ee

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/api/teams.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export const fetchTeams = async ({
3838
}
3939
};
4040

41-
export const setTeamRound = async (id: string, round: string) => {
41+
export const setTeamRound = async (id: string, round: number) => {
4242
try{
43-
const response = await axios.put<TeamsResponse>("/admin/team/rounds",{id, role: round});
43+
const response = await axios.put<TeamsResponse>("/admin/team/rounds",{id, round_qualified: round});
4444
return response.data
4545
}
4646
catch(err){

src/components/changeRound.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function ChangeRound({ row }: SelectCellProps) {
2525

2626
const mutation = useMutation({
2727
mutationFn: (data: { id: string; round: string }) => {
28-
return setTeamRound(data.id, data.round);
28+
return setTeamRound(data.id, Number(data.round));
2929
},
3030
onSuccess: async () => {
3131
await queryClient.invalidateQueries({

0 commit comments

Comments
 (0)