We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65140c0 commit 67bd800Copy full SHA for 67bd800
api/v1/subscription/subscription.go
@@ -1246,10 +1246,10 @@ func createSubscriptionApple(c *gin.Context) {
1246
var expires time.Time
1247
if productId == "24_hours_flex" || productId == "10_day_flex" {
1248
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
- }
+ subscription.Status = "expired"
+ core.UpdateSubscription(subscription.Id, subscription)
+ c.JSON(http.StatusForbidden, gin.H{"error": "Invalid subscription"})
+ return
1253
} else {
1254
expiresDate := result["expiresDate"].(float64)
1255
expires = time.Unix(int64(expiresDate)/1000, 0)
0 commit comments