docs: README 路由表同步 API 化(页面/API 分离 + API 约定章节)
This commit is contained in:
+12
-12
@@ -18,21 +18,21 @@
|
||||
|
||||
- [x] 7. 认证 API:`auth.go` Login/Register/Logout JSON 化(429 限流、会话轮换保留)
|
||||
- [x] 8. 认证模板:`login.html`/`register.html` 改 fetch + 错误 div `id`;base.html logout 改 fetch(logout-form 全局委托)
|
||||
- [ ] 9. 评论 API:`comment.go` PostComment JSON 化(校验码复用 i18n 键)
|
||||
- [ ] 10. 评论 API:`admin_comment.go` approve/reject/delete JSON 化
|
||||
- [ ] 11. 评论模板:`article.html` 评论表单 fetch、`comment_list.html` 操作后 reload
|
||||
- [ ] 12. 文章 CRUD API:`article.go`/`my_articles.go` 去 renderForm/Redirect 改 JSON(表单字段加 json tag)
|
||||
- [ ] 13. 文章模板:`article_create.html`/`my_article_form.html`/`article_list.html`/`my_articles.html` 改 fetch(`easyMDE.value()`、`e.submitter`)
|
||||
- [ ] 14. 用户 API:`admin_user.go` UserCreate/Update/Delete JSON 化(自防/最后管理员拦截改 403)
|
||||
- [ ] 15. 用户模板:`user_form.html`/`user_list.html` 改 fetch
|
||||
- [ ] 16. 设置 API:`settings.go` 5 组 save JSON 化;site favicon 拆出 `POST /api/admin/settings/site/favicon`
|
||||
- [ ] 17. 设置模板:`settings_site`/`settings_navlinks`/`settings_upload`/`settings_download`/`settings_comment` 5 页改 fetch
|
||||
- [ ] 18. 个人资料 API:`profile.go` UpdateProfile JSON 化(头像走 `/api/profile/avatar`)
|
||||
- [ ] 19. 个人资料模板:`profile.html` 文本表单改 fetch
|
||||
- [x] 9. 评论 API:`comment.go` PostComment JSON 化(校验码复用 i18n 键)
|
||||
- [x] 10. 评论 API:`admin_comment.go` approve/reject/delete JSON 化
|
||||
- [x] 11. 评论模板:`article.html` 评论表单 fetch、`comment_list.html` 操作后 reload
|
||||
- [x] 12. 文章 CRUD API:`article.go`/`my_articles.go` 去 renderForm/Redirect 改 JSON(表单字段加 json tag)
|
||||
- [x] 13. 文章模板:`article_create.html`/`my_article_form.html`/`article_list.html`/`my_articles.html` 改 fetch(`easyMDE.value()`、`e.submitter`)
|
||||
- [x] 14. 用户 API:`admin_user.go` UserCreate/Update/Delete JSON 化(自防/最后管理员拦截改 403)
|
||||
- [x] 15. 用户模板:`user_form.html`/`user_list.html` 改 fetch
|
||||
- [x] 16. 设置 API:`settings.go` 5 组 save JSON 化;site favicon/logo 拆出 `POST /api/admin/settings/site/favicon|logo`
|
||||
- [x] 17. 设置模板:`settings_site`/`settings_navlinks`/`settings_upload`/`settings_download`/`settings_comment` 5 页改 fetch(blogSettingsForm 委托)
|
||||
- [x] 18. 个人资料 API:`profile.go` UpdateProfile JSON 化(头像走 `/api/profile/avatar`)
|
||||
- [x] 19. 个人资料模板:`profile.html` 文本表单改 fetch
|
||||
|
||||
## 测试与收尾(high)
|
||||
|
||||
- [ ] 20. 新增 `handlers/api_test.go`:happy path / 校验码 / 401 / 403 / CSRF 头 / 429 / 409
|
||||
- [x] 20. 新增 `handlers/api_test.go`:happy path / 校验码 / 401 / 403 / CSRF 头 / 429 / 409
|
||||
- [ ] 21. 更新 `security_test.go`/`p2_validation_test.go`/`p3_upload_test.go`/`session_upload_security_test.go` 到新 URL 与 JSON 断言
|
||||
- [ ] 22. `go build ./... && go vet ./... && go test ./...` 全绿;README 路由表同步
|
||||
|
||||
|
||||
Reference in New Issue
Block a user