Commit Graph

15 Commits

Author SHA1 Message Date
a5efda9c23 feat(mixin): add TableBaseMixin and UUIDTableBaseMixin for async CRUD operations
- Implemented TableBaseMixin providing generic CRUD methods and automatic timestamp management.
- Introduced UUIDTableBaseMixin for models using UUID as primary keys.
- Added ListResponse for standardized paginated responses.
- Created TimeFilterRequest and PaginationRequest for filtering and pagination parameters.
- Enhanced get_with_count method to return both item list and total count.
- Included validation for time filter parameters in TimeFilterRequest.
- Improved documentation and usage examples throughout the code.
2025-12-22 18:29:14 +08:00
f93cb3eedb Add unit tests for models and services
- Implemented unit tests for Object model including folder and file creation, properties, and path retrieval.
- Added unit tests for Setting model covering creation, unique constraints, and type enumeration.
- Created unit tests for User model focusing on user creation, uniqueness, and group relationships.
- Developed unit tests for Login service to validate login functionality, including 2FA and token generation.
- Added utility tests for JWT creation and verification, ensuring token integrity and expiration handling.
- Implemented password utility tests for password generation, hashing, and TOTP verification.
2025-12-19 19:48:05 +08:00
51b6de921b feat: Implement API routers for user, tag, vas, webdav, and slave functionalities
- Added user authentication and registration endpoints with JWT support.
- Created tag management routes for creating and deleting tags.
- Implemented value-added service (VAS) endpoints for managing storage packs and orders.
- Developed WebDAV account management routes for creating, updating, and deleting accounts.
- Introduced slave router for handling file uploads, downloads, and aria2 task management.
- Enhanced JWT utility functions for token creation and secret key management.
- Established lifespan management for FastAPI application startup and shutdown processes.
- Integrated password handling utilities with Argon2 hashing and two-factor authentication support.
2025-12-19 18:04:34 +08:00
89e837d91c feat: 重构模型和响应结构,优化用户和对象管理逻辑,添加 Dockerfile 2025-12-18 18:28:41 +08:00
8b6e18f0e2 feat: 更新数据模型和API路由,优化用户信息获取及设置管理 2025-12-02 21:36:19 +08:00
1533d9e89c Refactor code structure for improved readability and maintainability 2025-11-27 20:56:48 +08:00
83276c8b95 优化用户登录逻辑,简化错误处理,更新密码哈希生成方式为Argon2 2025-11-01 19:41:19 +08:00
cf5539f3c2 重构模型基类 2025-09-26 06:18:59 +08:00
2a173c0566 添加Github登录,优化数据库模型 2025-09-01 00:21:06 +08:00
e98c46f44a 用户登录 2025-07-17 19:33:48 +08:00
33cca4e271 修复数据库迁移问题、新增环境变量读写 2025-07-15 17:32:00 +08:00
557a50f539 单元测试:新建用户与用户组 2025-07-14 15:13:05 +08:00
e011a1ea0e 完善 /api/site/config 路由,修复数据库无法二次启动 2025-07-02 00:42:54 +08:00
f6825b670f 数据库创建 2025-06-22 19:26:23 +08:00
eb3d2843eb 完成部分API路由以及文档 2025-06-18 02:14:37 +08:00