This commit is contained in:
2026-07-09 09:10:49 +08:00
parent 2882d37112
commit fec47bf47a
54 changed files with 5985 additions and 992 deletions
+10 -3
View File
@@ -202,6 +202,7 @@ async def create_user(
),
ip=None,
)
await db.commit()
return user
@@ -233,6 +234,7 @@ async def update_user_menus(
ensure_ascii=False,
),
)
await db.commit()
return {"message": "ok"}
@@ -289,6 +291,7 @@ async def adjust_credits(
ensure_ascii=False,
),
)
await db.commit()
return {"message": "ok"}
@@ -319,6 +322,7 @@ async def update_user_status(
ensure_ascii=False,
),
)
await db.commit()
return {"message": "ok"}
@@ -1594,7 +1598,7 @@ async def update_system_config(
if not config:
raise HTTPException(status_code=404, detail="配置不存在")
config.value = str(req.value)
await db.commit()
await db.flush()
await log_operation(
db,
admin.id,
@@ -1611,6 +1615,7 @@ async def update_system_config(
ensure_ascii=False,
),
)
await db.commit()
return config
@@ -2185,7 +2190,7 @@ async def upload_pdf(
key=config_key,
value=url,
))
await db.commit()
await db.flush()
await log_operation(
db,
admin.id,
@@ -2202,6 +2207,7 @@ async def upload_pdf(
ensure_ascii=False,
),
)
await db.commit()
return {"url": url}
@@ -2247,7 +2253,7 @@ async def upload_logo(
value=url,
description="网站Logo图片",
))
await db.commit()
await db.flush()
await log_operation(
db,
admin.id,
@@ -2263,6 +2269,7 @@ async def upload_logo(
ensure_ascii=False,
),
)
await db.commit()
return {"url": url}