增加操作手册
This commit is contained in:
@@ -312,12 +312,12 @@ async def get_site_info(db: AsyncSession = Depends(get_db)):
|
||||
"""Public endpoint returning site name, logo, agreement and copyright info."""
|
||||
result = await db.execute(
|
||||
select(SystemConfig).where(SystemConfig.key.in_([
|
||||
"site_name", "site_logo", "user_agreement_privacy_url", "site_copyright"
|
||||
"site_name", "site_logo", "user_agreement_privacy_url", "site_copyright", "operation_manual"
|
||||
]))
|
||||
)
|
||||
configs = result.scalars().all()
|
||||
info = {c.key: c.value for c in configs}
|
||||
|
||||
|
||||
# Helper function to convert relative path to full URL
|
||||
def to_full_url(path: str | None) -> str:
|
||||
if not path:
|
||||
@@ -328,12 +328,13 @@ async def get_site_info(db: AsyncSession = Depends(get_db)):
|
||||
# Convert relative path to full URL
|
||||
base_url = settings.BASE_URL.rstrip("/")
|
||||
return f"{base_url}{path}"
|
||||
|
||||
|
||||
return {
|
||||
"site_name": info.get("site_name", "VideoGen.AI"),
|
||||
"site_logo": to_full_url(info.get("site_logo")),
|
||||
"user_agreement_privacy_url": to_full_url(info.get("user_agreement_privacy_url")),
|
||||
"site_copyright": info.get("site_copyright", "© 2024 民众智创 版权所有"),
|
||||
"operation_manual": info.get("operation_manual", ""),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user