fix: PostsPage GetOverview 错误不再忽略
- studio_page_controller.go PostsPage 中 GetOverview 调用不再用 _ 忽略 error
- 错误时记录日志,模板侧已有 {{if .Overview}} 空值保护,页面正常降级渲染
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
@ -61,7 +62,10 @@ func (ctrl *StudioController) PostsPage(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
overview, _ := ctrl.postService.GetOverview(uid)
|
||||
overview, err2 := ctrl.postService.GetOverview(uid)
|
||||
if err2 != nil {
|
||||
log.Printf("[PostsPage] GetOverview failed for user %d: %v", uid, err2)
|
||||
}
|
||||
|
||||
c.HTML(http.StatusOK, "studio/posts.html", common.BuildPageData(c, gin.H{
|
||||
"Title": "内容管理 - 创作中心",
|
||||
|
||||
Reference in New Issue
Block a user