From b791ca0ee3481c3c4582918022f8d604212a2da0 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 30 Mar 2022 13:38:51 +0200 Subject: [PATCH] When a user exceeds their quota limit only their speed, not the rest of their allowance. --- api/handlers.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/handlers.go b/api/handlers.go index 1b469e26..d06fea40 100644 --- a/api/handlers.go +++ b/api/handlers.go @@ -1353,15 +1353,15 @@ func userLimitsGetFromTier(tierID int, quotaExceeded, inBytes bool) *UserLimitsG bpsMul = 1 } return &UserLimitsGET{ - TierID: tierID, - TierName: t.TierName, - Storage: t.Storage, + TierID: tierID, + TierName: t.TierName, + Storage: t.Storage, + MaxUploadSize: t.MaxUploadSize, + MaxNumberUploads: t.MaxNumberUploads, // If the user exceeds their quota, there will be brought down to // anonymous levels. UploadBandwidth: limitsTier.UploadBandwidth * bpsMul, DownloadBandwidth: limitsTier.DownloadBandwidth * bpsMul, - MaxUploadSize: limitsTier.MaxUploadSize, - MaxNumberUploads: limitsTier.MaxNumberUploads, RegistryDelay: limitsTier.RegistryDelay, } }