@@ -78,6 +78,7 @@ func (co *Config) AdminConfig(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hello := global.Config.Admin.Hello
|
hello := global.Config.Admin.Hello
|
||||||
|
if hello == "" {
|
||||||
helloFile := global.Config.Admin.HelloFile
|
helloFile := global.Config.Admin.HelloFile
|
||||||
if helloFile != "" {
|
if helloFile != "" {
|
||||||
b, err := os.ReadFile(helloFile)
|
b, err := os.ReadFile(helloFile)
|
||||||
@@ -85,6 +86,7 @@ func (co *Config) AdminConfig(c *gin.Context) {
|
|||||||
hello = string(b)
|
hello = string(b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//replace {{username}} to username
|
//replace {{username}} to username
|
||||||
hello = strings.Replace(hello, "{{username}}", u.Username, -1)
|
hello = strings.Replace(hello, "{{username}}", u.Username, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user