diff --git a/api/sites/domain.go b/api/sites/domain.go index 7f1c2f0b..82526e0e 100644 --- a/api/sites/domain.go +++ b/api/sites/domain.go @@ -148,7 +148,7 @@ func GetDomain(c *gin.Context) { certInfoMap := make(map[int]*cert.Info) - for serverIdx, server := range nginxConfig.Servers { + for serverIdx, server := range nginxConfig.Servers { for _, directive := range server.Directives { if directive.Directive == "ssl_certificate" { @@ -229,7 +229,7 @@ func SaveDomain(c *gin.Context) { }) return } - // recreate soft link + // recreate a soft link if helper.FileExists(enabledConfigFilePath) { _ = os.Remove(enabledConfigFilePath) enabledConfigFilePath = nginx.GetConfPath("sites-enabled", json.Name) diff --git a/app/src/components/NodeSelector/NodeSelector.vue b/app/src/components/NodeSelector/NodeSelector.vue index b9d4aad2..4016f658 100644 --- a/app/src/components/NodeSelector/NodeSelector.vue +++ b/app/src/components/NodeSelector/NodeSelector.vue @@ -19,7 +19,7 @@ const data_map = ref({}) as Ref> environment.get_list().then(r => { data.value = r.data - r.data.forEach(node => { + r.data?.forEach(node => { data_map.value[node.id] = node }) }) @@ -79,7 +79,7 @@ const value = computed({ - +