fix: remove ghost users being added as seats in stripe

This commit is contained in:
ShubhamPalriwala
2024-05-29 18:05:51 +05:30
parent 81b0c8bc12
commit 686a28cc09
@@ -16,6 +16,8 @@ export const licenseDALFactory = (db: TDbClient) => {
void bd.where({ orgId }); void bd.where({ orgId });
} }
}) })
.join(TableName.Users, `${TableName.OrgMembership}.userId`, `${TableName.Users}.id`)
.where(`${TableName.Users}.isGhost`, false)
.count(); .count();
return doc?.[0].count; return doc?.[0].count;
} catch (error) { } catch (error) {