[fix] adminRoot bug
This commit is contained in:
parent
2e239741d6
commit
0b1a4de23a
1 changed files with 2 additions and 2 deletions
|
|
@ -141,8 +141,8 @@ var startCmd = &cobra.Command{
|
|||
|
||||
func adminRoot() (string, int) {
|
||||
adminRoot := "/yao/"
|
||||
if root, ok := share.App.Optional["adminRoot"].(string); ok && root != "" {
|
||||
root = strings.TrimPrefix(root, "/")
|
||||
if share.App.AdminRoot != "" {
|
||||
root := strings.TrimPrefix(share.App.AdminRoot, "/")
|
||||
root = strings.TrimSuffix(root, "/")
|
||||
adminRoot = fmt.Sprintf("/%s/", root)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue