fix: update setConfig function to allow optional value and fix API endpoint

This commit is contained in:
shiyu
2025-12-29 10:29:44 +08:00
parent 56f947d0bf
commit 91ff1860b7
4 changed files with 145 additions and 195 deletions

View File

@@ -29,7 +29,7 @@ async def set_config(
request: Request,
current_user: Annotated[User, Depends(get_current_active_user)],
key: str = Form(...),
value: str = Form(...),
value: str = Form(""),
):
await ConfigService.set(key, value)
return success(ConfigItem(key=key, value=value).model_dump())