feat: more review comments

This commit is contained in:
=
2025-10-10 00:09:48 +05:30
parent d2a6a47397
commit 9d204a66fd
16 changed files with 32 additions and 20 deletions
+1 -1
View File
@@ -762,7 +762,7 @@ export const orgServiceFactory = ({
throw new NotFoundError({ message: `Organization membership with ID ${membershipId} not found` });
if (foundMembership.scopeOrgId !== orgId)
throw new UnauthorizedError({ message: "Updated org member doesn't belong to the organization" });
if (foundMembership.scopeOrgId === userId)
if (foundMembership.actorUserId === userId)
throw new UnauthorizedError({ message: "Cannot update own organization membership" });
const isCustomRole = !Object.values(OrgMembershipRole).includes(role as OrgMembershipRole);