Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into ph-telemetry
  • Loading branch information
vmatsiiako committed Jan 10, 2023
2 parents 387ef17 + b71ba35 commit 08ab27c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
5 changes: 3 additions & 2 deletions backend/src/controllers/v1/membershipOrgController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,14 @@ export const inviteUserToOrganization = async (req: Request, res: Response) => {
if (!membershipOrg) {
throw new Error('Failed to validate organization membership');
}

invitee = await User.findOne({
email: inviteeEmail
});
}).select('+publicKey');

if (invitee) {
// case: invitee is an existing user

inviteeMembershipOrg = await MembershipOrg.findOne({
user: invitee._id,
organization: organizationId
Expand Down
25 changes: 13 additions & 12 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 08ab27c

Please sign in to comment.