Skip to content

Commit

Permalink
Merge pull request #148 from holabayor/main
Browse files Browse the repository at this point in the history
fixed org id
  • Loading branch information
holabayor authored Sep 25, 2023
2 parents df974ec + 6079d48 commit 5be8a80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/organizationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const createOrganization = async (req, res, next) => {

const sendInviteCode = async (req, res, next) => {
try {
const { email, organizationId } = req.body;
const { email } = req.body;

// Generate a random verification code
const verificationCode = Math.floor(
Expand All @@ -51,7 +51,7 @@ const sendInviteCode = async (req, res, next) => {
await orgInvites.create({
email: email,
token: verificationCode,
org_id: organizationId,
org_id: req.user.org_id,
});

// Send an email with the verification code
Expand Down Expand Up @@ -100,7 +100,7 @@ const confirmInviteCode = async (req, res, next) => {
await orgInvites.destroy({
where: { token: verificationCode },
});

console.log(invite);
res.email = invite.email;
res.org_id = invite.org_id;
res.status(200).json({
Expand Down

0 comments on commit 5be8a80

Please sign in to comment.