docker,字段更改
This commit is contained in:
@@ -14,11 +14,11 @@ router = APIRouter(prefix="/accounts", tags=["账号管理"])
|
||||
def create_account(account: AccountCreate, db: Session = Depends(get_db)):
|
||||
"""创建账号"""
|
||||
# 检查账号是否已存在
|
||||
existing_account = AccountService.get_account_by_account(db, account.account)
|
||||
existing_account = AccountService.get_account_by_username(db, account.username)
|
||||
if existing_account:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_400_BAD_REQUEST,
|
||||
detail="账号已存在"
|
||||
detail="用户名已存在"
|
||||
)
|
||||
|
||||
return AccountService.create_account(db, account)
|
||||
@@ -34,8 +34,8 @@ def get_account(request: AccountGetRequest, db: Session = Depends(get_db)):
|
||||
accounts = AccountService.search_accounts(
|
||||
db,
|
||||
account_id=request.account_id,
|
||||
account=request.account,
|
||||
section=request.section,
|
||||
username=request.username,
|
||||
project_name=request.project_name,
|
||||
status=request.status,
|
||||
today_updated=request.today_updated
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user