Browse Source

get trial end date only if license key is missing

abhishek9686 1 year ago
parent
commit
17980cc222
1 changed files with 4 additions and 1 deletions
  1. 4 1
      controllers/server.go

+ 4 - 1
controllers/server.go

@@ -121,7 +121,10 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
 	if servercfg.ErrLicenseValidation != nil {
 		licenseErr = servercfg.ErrLicenseValidation.Error()
 	}
-	trialEndDate, _ := logic.GetTrialEndDate()
+	var trialEndDate time.Time
+	if servercfg.GetLicenseKey() == "" {
+		trialEndDate, _ = logic.GetTrialEndDate()
+	}
 	currentServerStatus := status{
 		DB:           database.IsConnected(),
 		Broker:       mq.IsConnected(),