1
0
Fork 0
mirror of synced 2024-07-01 20:41:03 +12:00

Merge pull request #2882 from Budibase/honour-quota

Deny only when usage quota is exceeded
This commit is contained in:
Rory Powell 2021-10-04 16:47:53 +01:00 committed by GitHub
commit db5565d03c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,7 +58,7 @@ exports.update = async (property, usage) => {
// increment the quota
quota.usageQuota[property] += usage
if (quota.usageQuota[property] >= quota.usageLimits[property]) {
if (quota.usageQuota[property] > quota.usageLimits[property]) {
throw new Error(
`You have exceeded your usage quota of ${quota.usageLimits[property]} ${property}.`
)