Update Partner
This commit is contained in:
@@ -103,10 +103,12 @@ type PartnerLicense struct {
|
||||
|
||||
func (l *LicenseDB) ToPartnerLicense() PartnerLicense {
|
||||
now := time.Now()
|
||||
daysToExpire := int64(l.EndDate.Sub(now).Hours() / 24)
|
||||
|
||||
daysToExpire := int64(l.EndDate.Sub(now).Hours() / 24)
|
||||
var licenseStatus string
|
||||
if daysToExpire < 0 {
|
||||
if now.Before(l.StartDate) {
|
||||
licenseStatus = "INACTIVE"
|
||||
} else if daysToExpire < 0 {
|
||||
licenseStatus = "EXPIRED"
|
||||
} else if daysToExpire <= 30 {
|
||||
licenseStatus = "EXPIRING_SOON"
|
||||
|
||||
Reference in New Issue
Block a user