1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 05:09:42 +02:00

Dotcom pricing landing page changes

This commit is contained in:
Harvey Kandola 2022-09-18 15:25:57 -04:00
parent ce07d4d147
commit 5ec911dce2
2 changed files with 21 additions and 21 deletions

View file

@ -159,23 +159,23 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
} else {
// Enterprise edition requires valid subscription data.
rc.Subscription = domain.Subscription{Edition: domain.EnterpriseEdition,
Seats: domain.Seats6,
Trial: false,
Start: time.Now().UTC(),
End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
// if len(strings.TrimSpace(org.Subscription)) > 0 {
// sd := domain.SubscriptionData{}
// es1 := json.Unmarshal([]byte(org.Subscription), &sd)
// if es1 == nil {
// rc.Subscription, err = domain.DecodeSubscription(sd)
// if err != nil {
// m.Runtime.Log.Error("unable to decode subscription for org "+rc.OrgID, err)
// }
// } else {
// m.Runtime.Log.Error("unable to load subscription for org "+rc.OrgID, es1)
// }
// }
// rc.Subscription = domain.Subscription{Edition: domain.EnterpriseEdition,
// Seats: domain.Seats6,
// Trial: false,
// Start: time.Now().UTC(),
// End: time.Now().UTC().Add(time.Hour * 24 * 7 * time.Duration(weeks))}
if len(strings.TrimSpace(org.Subscription)) > 0 {
sd := domain.SubscriptionData{}
es1 := json.Unmarshal([]byte(org.Subscription), &sd)
if es1 == nil {
rc.Subscription, err = domain.DecodeSubscription(sd)
if err != nil {
m.Runtime.Log.Error("unable to decode subscription for org "+rc.OrgID, err)
}
} else {
m.Runtime.Log.Error("unable to load subscription for org "+rc.OrgID, es1)
}
}
}
// Tag all HTTP calls with subscription status