refactor: 彻底移除 /posts/new 旧编辑器,统一迁移至 /studio/write
- 删除 /posts/new 路由,不再保留任何兼容层 - /posts/:id/edit 改为 301 跳转 /studio/write?id=:id - 删除 posts/new.html 模板和 editor.js - 移除 PostController.EditPage/Create/Update/Delete 孤儿方法 - 移除 /api/posts POST/PUT/DELETE 孤儿 API(保留 submit 和 upload-image) - posts/show.html 编辑链接指向 /studio/write
This commit is contained in:
@ -57,9 +57,6 @@ func setupAPIRoutes(r *gin.Engine, cfg *config.Config, d *dependencies) {
|
||||
postsAPI.Use(d.authMdw.Required())
|
||||
postsAPI.Use(middleware.CSRF(cfg))
|
||||
{
|
||||
postsAPI.POST("", d.postCtrl.Create)
|
||||
postsAPI.PUT("/:id", d.postCtrl.Update)
|
||||
postsAPI.DELETE("/:id", d.postCtrl.Delete)
|
||||
postsAPI.POST("/:id/submit", d.postCtrl.Submit)
|
||||
postsAPI.POST("/upload-image", d.postCtrl.UploadImage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user