mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 21:30:01 +08:00
✨ Compatible with pydantic 2.0 using the pydantic compatibility layer provided by nonebot
This commit is contained in:
@@ -44,11 +44,11 @@ async def _(path: str | None = None) -> Result[list[DirFile]]:
|
||||
@router.get(
|
||||
"/get_resources_size",
|
||||
dependencies=[authentication()],
|
||||
response_model=Result[SystemFolderSize],
|
||||
response_model=Result[list[SystemFolderSize]],
|
||||
response_class=JSONResponse,
|
||||
description="获取文件列表",
|
||||
)
|
||||
async def _(full_path: str | None = None) -> Result[SystemFolderSize]:
|
||||
async def _(full_path: str | None = None) -> Result[list[SystemFolderSize]]:
|
||||
return Result.ok(await get_system_disk(full_path))
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class AddFile(BaseModel):
|
||||
新建文件
|
||||
"""
|
||||
|
||||
parent: str | None
|
||||
parent: str | None = None
|
||||
"""父路径"""
|
||||
name: str
|
||||
"""新名称"""
|
||||
|
||||
Reference in New Issue
Block a user