This commit is contained in:
2026-06-29 13:51:32 +08:00
23 changed files with 562 additions and 341 deletions
+4 -4
View File
@@ -308,10 +308,10 @@ async def change_password(
@router.get("/site-info")
async def get_site_info(db: AsyncSession = Depends(get_db)):
"""Public endpoint returning site name and logo."""
"""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_url", "privacy_policy_url"
"site_name", "site_logo", "user_agreement_privacy_url", "site_copyright"
]))
)
configs = result.scalars().all()
@@ -331,8 +331,8 @@ async def get_site_info(db: AsyncSession = Depends(get_db)):
return {
"site_name": info.get("site_name", "VideoGen.AI"),
"site_logo": to_full_url(info.get("site_logo")),
"user_agreement_url": to_full_url(info.get("user_agreement_url")),
"privacy_policy_url": to_full_url(info.get("privacy_policy_url")),
"user_agreement_privacy_url": to_full_url(info.get("user_agreement_privacy_url")),
"site_copyright": info.get("site_copyright", "© 2024 民众智创 版权所有"),
}