feat: 管理端板块管理与旧版数据导入,补充部署运营文档

- 新增管理端板块管理页面与后端接口(admin_board)
- 新增旧版数据导入:legacyimport 服务、导入面板、importusers 命令行工具
- 聊天用户卡片、板块图标等 UI 组件与界面优化
- 补充 about/公告/1Panel 部署等文档
- gitignore 排除 dist/ 构建产物与 .agents/ 本地工具目录
This commit is contained in:
2026-09-24 03:37:44 +08:00
parent c1f6a6636b
commit 3e55b5d230
53 changed files with 5078 additions and 409 deletions

View File

@@ -137,7 +137,13 @@ func (h *Handlers) Register(c *gin.Context) {
}
if security.VerifyEmail {
if err = h.Ops.ConsumeCode(req.Email, "register", req.Code); err != nil {
c.JSON(400, gin.H{"error": "请先完成邮箱验证"})
var te *service.CodeThrottleError
if errors.As(err, &te) {
c.Header("Retry-After", strconv.Itoa(te.Wait))
c.JSON(429, gin.H{"error": te.Error(), "retry_after": te.Wait})
} else {
c.JSON(400, gin.H{"error": "请先完成邮箱验证"})
}
return
}
}