fix: 嵌入式前端正确服务world.json等静态文件
- 修复/install路由返回登录页问题 - checkConfigFile只检查数据目录 - setupEmbeddedFrontend正确响应项目目录下文件
This commit is contained in:
@@ -243,16 +243,8 @@ func handleSetup(c *gin.Context) {
|
||||
func checkConfigFile() bool {
|
||||
dataDir := config.GetDataDir()
|
||||
configPath := filepath.Join(dataDir, "config.yaml")
|
||||
if _, err := os.Stat(configPath); err == nil {
|
||||
return true
|
||||
}
|
||||
paths := []string{"config.yaml", "./config/config.yaml"}
|
||||
for _, p := range paths {
|
||||
if _, err := os.Stat(p); err == nil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
_, err := os.Stat(configPath)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
func checkAdminExists() bool {
|
||||
|
||||
Reference in New Issue
Block a user