fix(hackathon): use correct leave team endpoint

Changed from DELETE /teams/{id}/members/{userId} to POST /teams/{id}/leave

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Maulana Sodiqin
2025-11-28 18:36:21 +07:00
co-authored by Claude
parent f0eb11010d
commit 4d3677ebd2
+2 -2
View File
@@ -493,8 +493,8 @@ export const useLeaveTeam = () => {
throw new Error('You must be logged in to leave a team');
}
// Use the remove member endpoint with current user's ID
await hackathonApi.delete(`/teams/${teamId}/members/${session.user.id}`);
// Use the dedicated leave team endpoint
await hackathonApi.post(`/teams/${teamId}/leave`);
return { success: true };
},
onSuccess: () => {