新增应用可授权数量
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user