Merge branch 'main' of https://gitee.com/wg123/video-gen
This commit is contained in:
@@ -1081,8 +1081,8 @@ async def update_system_config(
|
||||
config = result.scalar_one_or_none()
|
||||
if not config:
|
||||
raise HTTPException(status_code=404, detail="配置不存在")
|
||||
config.value = req.value
|
||||
await db.flush()
|
||||
config.value = str(req.value)
|
||||
await db.commit()
|
||||
return config
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class ModelConfigOut(ModelConfigCreate):
|
||||
|
||||
|
||||
class SystemConfigUpdate(BaseModel):
|
||||
value: str
|
||||
value: str | int | float
|
||||
|
||||
|
||||
class SystemConfigOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user