mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 18:27:13 +08:00
refactor: 重构 tools.Read 函数
This commit is contained in:
@@ -100,8 +100,8 @@ func (r *OpenRestyController) GetConfig(ctx http.Context) http.Response {
|
||||
return check
|
||||
}
|
||||
|
||||
config := tools.Read("/www/server/openresty/conf/nginx.conf")
|
||||
if len(config) == 0 {
|
||||
config, err := tools.Read("/www/server/openresty/conf/nginx.conf")
|
||||
if err != nil {
|
||||
return controllers.Error(ctx, http.StatusInternalServerError, "获取OpenResty配置失败")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user