Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fixes to make the source 32bit compatible

Yee Jia Rongc0a3abb0ed01
diff --git a/server/ente/billing.go b/server/ente/billing.go
index 7e80d69c3f..f7d7a9a44e 100644
--- a/server/ente/billing.go
+++ b/server/ente/billing.go
@@ -11,7 +11,7 @@ import (
const (
// FreePlanStorage is the amount of storage in free plan
- FreePlanStorage = 5 * 1024 * 1024 * 1024
+ FreePlanStorage int64 = 5 * 1024 * 1024 * 1024
// FreePlanProductID is the product ID of free plan
FreePlanProductID = "free"
// FreePlanTransactionID is the dummy transaction ID for the free plan
@@ -112,7 +112,7 @@ type BillingPlan struct {
}
type FreePlan struct {
- Storage int `json:"storage"`
+ Storage int64 `json:"storage"`
Duration int `json:"duration"`
Period string `json:"period"`
}
diff --git a/server/pkg/middleware/rate_limit.go b/server/pkg/middleware/rate_limit.go
index fc268e0bd0..747cb9a867 100644
--- a/server/pkg/middleware/rate_limit.go
+++ b/server/pkg/middleware/rate_limit.go
@@ -19,13 +19,13 @@ import (
)
type RateLimitMiddleware struct {
- limit10ReqPerMin *limiter.Limiter
- limit200ReqPerSec *limiter.Limiter
- discordCtrl *discord.DiscordController
count int64 // Use int64 for atomic operations
limit int64
reset time.Duration
ticker *time.Ticker
+ limit10ReqPerMin *limiter.Limiter
+ limit200ReqPerSec *limiter.Limiter
+ discordCtrl *discord.DiscordController
}
func NewRateLimitMiddleware(discordCtrl *discord.DiscordController, limit int64, reset time.Duration) *RateLimitMiddleware {