mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 23:24:32 +08:00
removing some errors
This commit is contained in:
parent
d0c2f06e60
commit
cd37d7701b
3 changed files with 5 additions and 4 deletions
|
@ -58,7 +58,7 @@ func getAllDNS(w http.ResponseWriter, r *http.Request) {
|
|||
func GetAllDNS() ([]models.DNSEntry, error) {
|
||||
var dns []models.DNSEntry
|
||||
networks, err := models.GetNetworks()
|
||||
if err != nil {
|
||||
if err != nil && !database.IsEmptyRecord(err) {
|
||||
return []models.DNSEntry{}, err
|
||||
}
|
||||
for _, net := range networks {
|
||||
|
@ -139,7 +139,7 @@ func SetDNS() error {
|
|||
hostfile := txeh.Hosts{}
|
||||
var corefilestring string
|
||||
networks, err := models.GetNetworks()
|
||||
if err != nil {
|
||||
if err != nil && !database.IsEmptyRecord(err){
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ func getNetworks(w http.ResponseWriter, r *http.Request) {
|
|||
err := errors.New("Networks Error")
|
||||
if networksSlice[0] == ALL_NETWORK_ACCESS {
|
||||
allnetworks, err = models.GetNetworks()
|
||||
if err != nil {
|
||||
if err != nil && !database.IsEmptyRecord(err){
|
||||
returnErrorResponse(w, r, formatError(err, "internal"))
|
||||
return
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ func GetServerConfig() config.ServerConfig {
|
|||
if DisableDefaultNet() {
|
||||
cfg.DisableRemoteIPCheck = "on"
|
||||
}
|
||||
cfg.Database = GetDB()
|
||||
cfg.Platform = GetPlatform()
|
||||
cfg.Version = GetVersion()
|
||||
return cfg
|
||||
|
@ -73,7 +74,7 @@ func GetAPIConnString() string {
|
|||
return conn
|
||||
}
|
||||
func GetVersion() string {
|
||||
version := "0.7.1"
|
||||
version := "0.7.2"
|
||||
if config.Config.Server.Version != "" {
|
||||
version = config.Config.Server.Version
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue