Browse Source

fix(admin): Use admin-hello first
(#274) (#255)

lejianwen 7 months ago
parent
commit
f20414b3a5
1 changed files with 7 additions and 5 deletions
  1. 7 5
      http/controller/admin/config.go

+ 7 - 5
http/controller/admin/config.go

@@ -78,11 +78,13 @@ func (co *Config) AdminConfig(c *gin.Context) {
78 78
 	}
79 79
 
80 80
 	hello := global.Config.Admin.Hello
81
-	helloFile := global.Config.Admin.HelloFile
82
-	if helloFile != "" {
83
-		b, err := os.ReadFile(helloFile)
84
-		if err == nil && len(b) > 0 {
85
-			hello = string(b)
81
+	if hello == "" {
82
+		helloFile := global.Config.Admin.HelloFile
83
+		if helloFile != "" {
84
+			b, err := os.ReadFile(helloFile)
85
+			if err == nil && len(b) > 0 {
86
+				hello = string(b)
87
+			}
86 88
 		}
87 89
 	}
88 90