mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
🚀 dashboard v0.13.31 bytecdn -> staticfile
This commit is contained in:
@@ -724,18 +724,34 @@ func (ma *memberAPI) updateSetting(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if yes, err := utils.IsTemplateDirEmpty("theme-" + sf.Theme); err != nil || yes {
|
||||
if _, yes := model.Themes[sf.Theme]; !yes {
|
||||
c.JSON(http.StatusOK, model.Response{
|
||||
Code: http.StatusBadRequest,
|
||||
Message: fmt.Sprintf("前台主题文件异常:%s", err),
|
||||
Message: fmt.Sprintf("前台主题不存在:%s", sf.Theme),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if yes, err := utils.IsTemplateDirEmpty("dashboard-" + sf.DashboardTheme); err != nil || yes {
|
||||
if _, yes := model.Themes[sf.DashboardTheme]; !yes {
|
||||
c.JSON(http.StatusOK, model.Response{
|
||||
Code: http.StatusBadRequest,
|
||||
Message: fmt.Sprintf("后台主题文件异常:%s", err),
|
||||
Message: fmt.Sprintf("后台主题不存在:%s", sf.DashboardTheme),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if !utils.IsFileExists("resource/template/theme-" + sf.Theme + "/home.html") {
|
||||
c.JSON(http.StatusOK, model.Response{
|
||||
Code: http.StatusBadRequest,
|
||||
Message: fmt.Sprintf("前台主题文件异常:%s", sf.Theme),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if !utils.IsFileExists("resource/template/dashboard-" + sf.DashboardTheme + "/setting.html") {
|
||||
c.JSON(http.StatusOK, model.Response{
|
||||
Code: http.StatusBadRequest,
|
||||
Message: fmt.Sprintf("后台主题文件异常:%s", sf.DashboardTheme),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user