This commit is contained in:
jxxghp
2023-08-08 06:59:17 +08:00
parent 38dd65bece
commit 3c3b8ff0e4
6 changed files with 8 additions and 10 deletions

View File

@ -5,7 +5,6 @@ from fastapi import APIRouter, Depends, HTTPException
from app import schemas
from app.chain.douban import DoubanChain
from app.chain.search import SearchChain
from app.core.context import Context
from app.core.security import verify_token
from app.schemas.types import MediaType

View File

@ -75,8 +75,7 @@ def cookie_cloud_sync(background_tasks: BackgroundTasks,
@router.get("/reset", summary="重置站点", response_model=schemas.Response)
def cookie_cloud_sync(background_tasks: BackgroundTasks,
db: Session = Depends(get_db),
def cookie_cloud_sync(db: Session = Depends(get_db),
_: schemas.TokenPayload = Depends(verify_token)) -> Any:
"""
清空所有站点数据并重新同步CookieCloud站点信息

View File

@ -43,7 +43,7 @@ def create_user(
user_info["hashed_password"] = get_password_hash(user_info["password"])
user_info.pop("password")
user = User(**user_info)
user = user.create(db)
user.create(db)
return schemas.Response(success=True)