mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 01:15:49 +10:00
fix: make better
This commit is contained in:
@@ -89,6 +89,13 @@ export const deleteAdminOrganisationMemberRoute = adminProcedure
|
||||
});
|
||||
});
|
||||
|
||||
// A member was removed — queue a seat sync to true the Stripe quantity down
|
||||
// to the new count (no proration, no credit).
|
||||
await jobs.triggerJob({
|
||||
name: 'sync.organisation-seats',
|
||||
payload: { organisationId },
|
||||
});
|
||||
|
||||
await jobs.triggerJob({
|
||||
name: 'send.organisation-member-left.email',
|
||||
payload: {
|
||||
|
||||
@@ -104,6 +104,13 @@ export const deleteOrganisationMembers = async ({
|
||||
});
|
||||
});
|
||||
|
||||
// Members were removed — queue a seat sync to true the Stripe quantity down to
|
||||
// the new count (no proration, no credit).
|
||||
await jobs.triggerJob({
|
||||
name: 'sync.organisation-seats',
|
||||
payload: { organisationId },
|
||||
});
|
||||
|
||||
for (const member of membersToDelete) {
|
||||
await jobs.triggerJob({
|
||||
name: 'send.organisation-member-left.email',
|
||||
|
||||
@@ -65,6 +65,13 @@ export const leaveOrganisationRoute = authenticatedProcedure
|
||||
});
|
||||
});
|
||||
|
||||
// A member was removed — queue a seat sync to true the Stripe quantity down
|
||||
// to the new count (no proration, no credit).
|
||||
await jobs.triggerJob({
|
||||
name: 'sync.organisation-seats',
|
||||
payload: { organisationId },
|
||||
});
|
||||
|
||||
await jobs.triggerJob({
|
||||
name: 'send.organisation-member-left.email',
|
||||
payload: {
|
||||
|
||||
Reference in New Issue
Block a user