update:删除过期文件夹的方式

This commit is contained in:
lan
2022-12-27 22:45:44 +08:00
parent c8ac6bb76b
commit 3344f471e3
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ async def admin_delete(code: str, s: AsyncSession = Depends(get_session)):
async def config(s: AsyncSession = Depends(get_session)):
# 从数据库获取系统配置
data = (await s.execute(select(Values).filter(Values.key == 'config'))).scalar_one_or_none()
return {'detail': '获取成功', 'data': data.value}
return {'detail': '获取成功', 'data': data.value if data else {}}
@app.get('/')