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()
|
config = result.scalar_one_or_none()
|
||||||
if not config:
|
if not config:
|
||||||
raise HTTPException(status_code=404, detail="配置不存在")
|
raise HTTPException(status_code=404, detail="配置不存在")
|
||||||
config.value = req.value
|
config.value = str(req.value)
|
||||||
await db.flush()
|
await db.commit()
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ModelConfigOut(ModelConfigCreate):
|
|||||||
|
|
||||||
|
|
||||||
class SystemConfigUpdate(BaseModel):
|
class SystemConfigUpdate(BaseModel):
|
||||||
value: str
|
value: str | int | float
|
||||||
|
|
||||||
|
|
||||||
class SystemConfigOut(BaseModel):
|
class SystemConfigOut(BaseModel):
|
||||||
|
|||||||
Reference in New Issue
Block a user