This commit is contained in:
Alex Holliday committed 2026-01-08 18:53:11 +00:00
1 parent 0dd977eeef
commit b4d127c6ce
3 files changed
+6 -3

No files matched your search

+1 -1
View File
@@ -436,7 +436,7 @@ class AuthService implements IAuthService {
throw new ApiError("Organization entitlement error"); throw new ApiError("Organization entitlement error");
} }
const orgRoles = await this.roleRepository.findById( const orgRoles = await this.roleRepository.findByIdAndOrgId(
orgMembership.roleId || "", orgMembership.roleId || "",
org.id org.id
); );
@@ -55,7 +55,10 @@ class InviteService implements IInviteService {
teamRoleId: string teamRoleId: string
) => { ) => {
try { try {
const role = await this.roleRepository.findById(teamRoleId, orgId); const role = await this.roleRepository.findByIdAndOrgId(
teamRoleId,
orgId
);
if (!role) { if (!role) {
throw new ApiError("Role not found", 404); throw new ApiError("Role not found", 404);
+1 -1
View File
@@ -72,7 +72,7 @@ class MeService implements IMeService {
throw new ApiError("Organization not found"); throw new ApiError("Organization not found");
} }
const orgRole = await this.roleRepository.findById( const orgRole = await this.roleRepository.findByIdAndOrgId(
orgMembership.roleId || "", orgMembership.roleId || "",
org.id org.id
); );