feat: 完整内容 Limits 与伪静态 Admin

设置页可配字数/编辑窗/分页与伪静态后缀;公开帖/板/用户链接走规范路径并 301。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 04:12:43 +08:00
parent 118f967540
commit f0358e0f71
20 changed files with 277 additions and 63 deletions

View File

@@ -106,7 +106,7 @@ func (d Deps) ComposePost(c *gin.Context) {
} else {
ctx.SetFlash("发帖成功")
}
ctx.Redirect(fmt.Sprintf("/post/%d", post.ID))
ctx.Redirect(d.postHref(post.ID))
}
// PostEditGet 编辑帖
@@ -152,7 +152,7 @@ func (d Deps) PostEditPost(c *gin.Context) {
return
}
ctx.SetFlash("已保存")
ctx.Redirect(fmt.Sprintf("/post/%d", post.ID))
ctx.Redirect(d.postHref(post.ID))
}
// ComposeUpload 帖图上传JSON供 compose 页 fetch