From f20414b3a57190e048f4cee03f56c251adc78c26 Mon Sep 17 00:00:00 2001 From: lejianwen <84855512@qq.com> Date: Sun, 15 Jun 2025 12:54:04 +0800 Subject: [PATCH] fix(admin): Use admin-hello first (#274) (#255) --- http/controller/admin/config.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/http/controller/admin/config.go b/http/controller/admin/config.go index 6c830e5..f4e7e30 100644 --- a/http/controller/admin/config.go +++ b/http/controller/admin/config.go @@ -78,11 +78,13 @@ func (co *Config) AdminConfig(c *gin.Context) { } hello := global.Config.Admin.Hello - helloFile := global.Config.Admin.HelloFile - if helloFile != "" { - b, err := os.ReadFile(helloFile) - if err == nil && len(b) > 0 { - hello = string(b) + if hello == "" { + helloFile := global.Config.Admin.HelloFile + if helloFile != "" { + b, err := os.ReadFile(helloFile) + if err == nil && len(b) > 0 { + hello = string(b) + } } }