chore: change the defaulkt bussiness quata to 10 gig

This commit is contained in:
mahyargdz
2025-08-17 09:19:45 +03:30
parent 687ee80842
commit 8642b8e8d5
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -192,7 +192,7 @@ export class UsersService {
// Check if business has enough quota
const remainingQuota = Number(business.remainingQuota || 0);
if (remainingQuota < QUOTA_CONSTANTS.USER_QUOTA_DEDUCTION) {
throw new BadRequestException("Insufficient quota to create user. Please upgrade your plan.");
throw new BadRequestException(BusinessMessage.INSUFFICIENT_QUOTA);
}
const domain = await this.domainsService.getDomainById(domainId, businessId);
@@ -246,7 +246,7 @@ export class UsersService {
await this.userSettingsService.createUserSettings(user.id, em);
business.usedQuota = Number(business.usedQuota) + QUOTA_CONSTANTS.USER_QUOTA_DEDUCTION;
business.usedQuota = Number(business.usedQuota) + userQuota;
business.remainingQuota = Number(business.quota) - Number(business.usedQuota);
await em.persistAndFlush([user, business]);