chore: change the defaulkt bussiness quata to 10 gig
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user