refactor: 移除 /posts/new 路由,301 重定向至 /studio/write

- /posts/new 路由改为 301 重定向至 /studio/write
- 删除孤儿 NewPage handler
- 帖子列表撰写链接指向 /studio/write
- 保留 posts/new.html 及 editor.js(EditPage 仍在使用)
This commit is contained in:
2026-05-31 15:28:28 +08:00
parent e98bfe193b
commit 7e50c892ad
3 changed files with 4 additions and 10 deletions

View File

@ -135,14 +135,6 @@ func (ctrl *PostController) ShowPage(c *gin.Context) {
}))
}
// NewPage 发帖页面
func (ctrl *PostController) NewPage(c *gin.Context) {
c.HTML(http.StatusOK, "posts/new.html", common.BuildPageData(c, gin.H{
"Title": "撰写帖子",
"ExtraCSS": "/static/css/posts.css",
}))
}
// EditPage 编辑页面
func (ctrl *PostController) EditPage(c *gin.Context) {
id, err := strconv.ParseUint(c.Param("id"), 10, 64)