v0.15.13 generate release

This commit is contained in:
naiba
2023-11-28 23:01:37 +08:00
parent 7a774319dd
commit dc94259a56
8 changed files with 65 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ import (
"github.com/naiba/nezha/pkg/mygin"
"github.com/naiba/nezha/pkg/utils"
"github.com/naiba/nezha/proto"
"github.com/naiba/nezha/resource"
"github.com/naiba/nezha/service/singleton"
)
@@ -863,7 +864,7 @@ func (ma *memberAPI) updateSetting(c *gin.Context) {
return
}
if !utils.IsFileExists("resource/template/theme-" + sf.Theme + "/home.html") {
if !utils.IsFileExists("resource/template/theme-"+sf.Theme+"/home.html") && !resource.IsTemplateFileExist("template/theme-"+sf.Theme+"/home.html") {
c.JSON(http.StatusOK, model.Response{
Code: http.StatusBadRequest,
Message: fmt.Sprintf("前台主题文件异常:%s", sf.Theme),
@@ -871,7 +872,7 @@ func (ma *memberAPI) updateSetting(c *gin.Context) {
return
}
if !utils.IsFileExists("resource/template/dashboard-" + sf.DashboardTheme + "/setting.html") {
if !utils.IsFileExists("resource/template/dashboard-"+sf.DashboardTheme+"/setting.html") && !resource.IsTemplateFileExist("template/dashboard-"+sf.DashboardTheme+"/setting.html") {
c.JSON(http.StatusOK, model.Response{
Code: http.StatusBadRequest,
Message: fmt.Sprintf("后台主题文件异常:%s", sf.DashboardTheme),