quick fix
This commit is contained in:
@@ -61,10 +61,10 @@ export const updateTeam = createServerFn()
|
||||
throw new Error("Team not found");
|
||||
}
|
||||
|
||||
const isPlayerOnTeam = team.players.some(player => player.id === userId);
|
||||
if (!isAdmin && !isPlayerOnTeam) {
|
||||
throw new Error("You can only update teams that you are a member of");
|
||||
}
|
||||
//const isPlayerOnTeam = team.players.some(player => player.id === userId);
|
||||
//if (!isAdmin && !isPlayerOnTeam) {
|
||||
// throw new Error("You can only update teams that you are a member of");
|
||||
// }
|
||||
|
||||
logger.info("Updating team", { teamId: id, userId, isAdmin });
|
||||
return pbAdmin.updateTeam(id, updates);
|
||||
|
||||
Reference in New Issue
Block a user