Skip to content

Commit

Permalink
let free orgs remove users (#3058)
Browse files Browse the repository at this point in the history
  • Loading branch information
colegottdank authored Dec 13, 2024
1 parent d3f8bc1 commit 69e1480
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,12 @@ export class OrganizationController extends Controller {
return err(memberCount.error ?? "Error getting member count");
}

if (memberCount.data > 0) {
const org = await organizationManager.getOrg();
if (org.error || !org.data) {
return err(org.error?.message ?? "Error getting organization");
}

if (memberCount.data > 0 && org.data.tier != "free") {
const userCount = await stripeManager.updateProUserCount(
memberCount.data - 1
);
Expand Down

0 comments on commit 69e1480

Please sign in to comment.