Skip to content

Commit 67bd800

Browse files
committed
don't restore flex subscriptions
1 parent 65140c0 commit 67bd800

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/v1/subscription/subscription.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,10 +1246,10 @@ func createSubscriptionApple(c *gin.Context) {
12461246
var expires time.Time
12471247
if productId == "24_hours_flex" || productId == "10_day_flex" {
12481248
isDeleted = true
1249-
expires = time.Now().Add(24 * time.Hour)
1250-
if productId == "10_day_flex" {
1251-
expires = time.Now().AddDate(0, 0, 10)
1252-
}
1249+
subscription.Status = "expired"
1250+
core.UpdateSubscription(subscription.Id, subscription)
1251+
c.JSON(http.StatusForbidden, gin.H{"error": "Invalid subscription"})
1252+
return
12531253
} else {
12541254
expiresDate := result["expiresDate"].(float64)
12551255
expires = time.Unix(int64(expiresDate)/1000, 0)

0 commit comments

Comments
 (0)