Commit Graph

10 Commits

Author SHA1 Message Date
8a12744 e842a9bc1d refactor: split some logic into util func 2026-01-14 21:42:32 +08:00
8a12744 3a89608d99 fix: args that slowapi need 2026-01-06 22:07:10 +08:00
8a12744 9295e7c7be feat: add account locking and rate limit 2026-01-06 22:02:58 +08:00
8a12744 2626477b0d feat: add support for pagination responses
also fix check-in error messages not displaying
2026-01-06 21:30:19 +08:00
8a12744 a0143e805f perf(admin): optimize token expiry query in stats endpoint
Replace N+1 loop with SQL-level filtering using cast and and_ operators
to count users with expiring tokens. Performance improvement: O(N) → O(1).
2026-01-05 23:18:19 +08:00
8a12744 a9b141fc69 feat: implement JWT auth and optimize token validation
- Separate JWT login (21d) from check-in token
- Unify check-in token validation with verify_checkin_authorization()
- Update API docs for dual-token architecture
2026-01-05 23:02:50 +08:00
8a12744 a5de813c82 feat: 支持创建任务时自定义crontab并清理冗余代码
- 添加创建任务时的crontab编辑控件
- 修复创建任务按钮状态重置问题
- 创建任务后自动加载到调度器
- 删除废弃的手动创建任务API和相关代码
2026-01-05 20:53:25 +08:00
8a12744 5cdc8b2144 feat: improve error handling and code quality
后端改进:
- 添加统一异常处理系统 (exceptions.py, response.py)
- 实现自定义异常类 (ValidationError, AuthorizationError, ResourceNotFoundError, BusinessLogicError)
- 配置全局异常处理器,统一 API 错误响应格式
- 迁移业务逻辑错误到自定义异常 (users.py, auth.py)
- 添加 SQL LIKE 通配符转义,防止通配符滥用
- 使用 EmailStr 进行邮箱格式验证
- 移除敏感字段暴露 (jwt_sub)

前端改进:
- 配置 ESLint 9 (flat config) 和 Prettier
- 修复所有 ESLint 错误和警告
- 移除未使用的变量和导入
- 为组件添加 PropTypes 默认值
- 统一代码格式和风格
2026-01-03 19:01:15 +08:00
8a12744 827c9198ae feat: migrate from Element Plus to Ant Design Vue and update Vite configuration for better dependency management
- Updated Vite configuration to manually chunk Ant Design Vue for improved dependency management.
- Added a comprehensive migration testing checklist for transitioning from Element Plus 2.13.0 to Ant Design Vue 4.x, covering various components and functionalities.
2026-01-03 01:38:38 +08:00
8a12744 fdc725b893 refactor: v2
backend & frontend
2026-01-01 18:38:21 +08:00