From aec350281efbcbc440c3e0214496af3596fc471e Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 8 Feb 2025 13:30:19 +0200 Subject: [PATCH] Fix managers can't upload team pics (for real) --- app/features/img-upload/actions/upload.server.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/features/img-upload/actions/upload.server.ts b/app/features/img-upload/actions/upload.server.ts index 59d2b9497..d32bd4da6 100644 --- a/app/features/img-upload/actions/upload.server.ts +++ b/app/features/img-upload/actions/upload.server.ts @@ -97,14 +97,9 @@ async function validatedTeam({ }); const team = await TeamRepository.findByCustomUrl(teamCustomUrl); - validate(team, "You must be on a team to upload images"); + validate(team, "Team not found"); validate( - team.members.some((member) => member.id === user.id && member.isOwner), - "You must be on the team to upload images", - ); - const detailedTeam = await TeamRepository.findByCustomUrl(team.customUrl); - validate( - detailedTeam && isTeamManager({ team: detailedTeam, user }), + isTeamManager({ team, user }), "You must be the team manager to upload images", );