diff --git a/.circleci/config.yml b/.circleci/config.yml index d3aab5b3..1acd4a4c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -149,7 +149,7 @@ workflows: context : org-global filters: branches: - only: ['develop', 'migration-setup', 'pm-1169_1'] + only: ['develop', 'migration-setup'] - deployProd: context : org-global filters: diff --git a/src/routes/projectMemberInvites/update.js b/src/routes/projectMemberInvites/update.js index 7869f7e3..e5005c4a 100644 --- a/src/routes/projectMemberInvites/update.js +++ b/src/routes/projectMemberInvites/update.js @@ -233,6 +233,15 @@ module.exports = [ transaction: t, }); + const invitesToBeUpdated = await models.ProjectMemberInvite.findAll({ + where: { + applicationId: { + [Op.in]: copilotApplications.map(item => item.id), + } + }, + transaction: t, + }); + // Cancel the existing invites which are opened via // applications await models.ProjectMemberInvite.update({ @@ -245,6 +254,14 @@ module.exports = [ }, transaction: t, }); + + invitesToBeUpdated.forEach((inviteToBeUpdated) => { + util.sendResourceToKafkaBus( + req, + EVENT.ROUTING_KEY.PROJECT_MEMBER_INVITE_UPDATED, + RESOURCES.PROJECT_MEMBER_INVITE, + inviteToBeUpdated.toJSON()); + }) } await t.commit();