mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 15:44:52 +08:00
added ee check
This commit is contained in:
parent
96772bb4bd
commit
4917c457db
2 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,7 @@ type ServerConfig struct {
|
||||||
BasicAuth string `yaml:"basic_auth"`
|
BasicAuth string `yaml:"basic_auth"`
|
||||||
LicenseValue string `yaml:"license_value"`
|
LicenseValue string `yaml:"license_value"`
|
||||||
NetmakerAccountID string `yaml:"netmaker_account_id"`
|
NetmakerAccountID string `yaml:"netmaker_account_id"`
|
||||||
|
IsEE string `yaml:"is_ee"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SQLConfig - Generic SQL Config
|
// SQLConfig - Generic SQL Config
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
|
"github.com/gravitl/netmaker/ee"
|
||||||
"github.com/gravitl/netmaker/logger"
|
"github.com/gravitl/netmaker/logger"
|
||||||
"github.com/gravitl/netmaker/logic"
|
"github.com/gravitl/netmaker/logic"
|
||||||
"github.com/gravitl/netmaker/models"
|
"github.com/gravitl/netmaker/models"
|
||||||
|
@ -136,6 +137,10 @@ func getConfig(w http.ResponseWriter, r *http.Request) {
|
||||||
// get params
|
// get params
|
||||||
|
|
||||||
scfg := servercfg.GetServerConfig()
|
scfg := servercfg.GetServerConfig()
|
||||||
|
scfg.IsEE = "no"
|
||||||
|
if ee.IsEnterprise() {
|
||||||
|
scfg.IsEE = "yes"
|
||||||
|
}
|
||||||
json.NewEncoder(w).Encode(scfg)
|
json.NewEncoder(w).Encode(scfg)
|
||||||
//w.WriteHeader(http.StatusOK)
|
//w.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue