Browse Source
Merge pull request #2882 from Budibase/honour-quota
Deny only when usage quota is exceeded
pull/2885/head
Rory Powell
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
packages/server/src/utilities/usageQuota.js
|
|
|
@ -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}.` |
|
|
|
) |
|
|
|
|