feat: Enhance file management and user features
- Add file deduplication mechanism based on PhysicalFile reference counting. - Implement chunked upload support for large files with resumable uploads. - Update sharing page to automatically render README and preview content. - Integrate Redis for caching and token storage (optional). - Refactor project structure to include new models for download tasks, nodes, and tasks. - Introduce user filtering parameters for admin user management. - Add CORS middleware for handling cross-origin requests. - Improve error messages for authentication failures. - Update user model to include two-factor authentication key management. - Enhance API documentation and response models for clarity. - Implement admin checks for user management and permissions.
This commit is contained in:
@@ -33,7 +33,7 @@ async def auth_required(
|
||||
return user
|
||||
|
||||
except jwt.InvalidTokenError:
|
||||
http_exceptions.raise_unauthorized("账号或密码错误")
|
||||
http_exceptions.raise_unauthorized("凭据过期或无效")
|
||||
|
||||
async def admin_required(
|
||||
user: Annotated[User, Depends(auth_required)],
|
||||
|
||||
Reference in New Issue
Block a user