新增应用可授权数量

This commit is contained in:
18610128193
2026-06-10 16:17:22 +08:00
parent a6b6e5f822
commit 488f0e082e
4 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ async def create_app(
db: AsyncSession = Depends(get_db),
):
try:
app = await create_user_oauth_app(db, req.app_id, req.secret, req.open_type, admin.id)
app = await create_user_oauth_app(db, req.app_id, req.secret, req.open_type, admin.id, req.count)
return UserOAuthAppOut.model_validate(app)
except ValueError as e:
raise HTTPException(
@@ -72,7 +72,7 @@ async def update_app(
admin: User = Depends(get_admin_user),
db: AsyncSession = Depends(get_db),
):
app = await update_user_oauth_app(db, id, req.secret, req.open_type, req.status, admin.id)
app = await update_user_oauth_app(db, id, req.secret, req.open_type, req.status, req.count, admin.id)
if not app:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,