Commit Graph

3 Commits

Author SHA1 Message Date
3991a02a8c feat: 添加管理员用户名密码登录功能
新增 /v1/admin/auth/login 接口,支持用户名密码登录获取 JWT Token。
- 添加 admin_users 表存储管理员账号和哈希密码
- 使用 bcryptjs 进行密码哈希(cost=10)
- JWT Token 认证优先,保留 ADMIN_TOKEN 作为向后兼容
- 记录登录审计日志到 admin_audit_log
- 种子数据创建默认管理员(username: admin, password: admin123)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 15:25:31 +08:00
4c0419649b docs: update admin categories API with pagination parameters
- Add page/limit query parameters documentation
- Update response format to include pagination metadata
- Specify parameter constraints (page ≥ 1, limit 1-50)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 12:57:24 +08:00
2dd5f18822 docs: add API reference and environment variable guide
- docs/api-reference.md: comprehensive API documentation for client and admin endpoints
- docs/env-secrets-guide.md: guide for generating secure keys and tokens
2026-04-11 12:01:53 +08:00