Deny only when usage quota is exceeded

This commit is contained in:
Rory Powell 2021-10-04 14:07:10 +01:00
parent 685fc49b01
commit c3a95d6c03
1 changed files with 1 additions and 1 deletions

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}.`
)