This commit is contained in:
jxxghp
2024-05-05 11:54:42 +08:00
parent d8644a20c0
commit dcd46f1627
4 changed files with 27 additions and 11 deletions

View File

@ -87,8 +87,8 @@ def read_current_user(
@router.post("/avatar/{user_id}", summary="上传用户头像", response_model=schemas.Response)
async def upload_avatar(user_id: int, db: Session = Depends(get_db),
file: UploadFile = File(...)):
async def upload_avatar(user_id: int, db: Session = Depends(get_db), file: UploadFile = File(...),
_: User = Depends(get_current_active_user)):
"""
上传用户头像
"""