This commit is contained in:
2026-06-29 11:26:14 +08:00
parent 43d12894c1
commit 9dd1bcdefc
11 changed files with 40 additions and 31 deletions
+4 -4
View File
@@ -301,10 +301,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()
@@ -324,8 +324,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 民众智创 版权所有"),
}
+3 -3
View File
@@ -164,12 +164,12 @@ async def _seed_data():
configs = [
("site_name", "民众智创", "网站名称"),
("site_logo", "", "网站Logo URL"),
("site_copyright", "© 2024 民众智创 版权所有", "网站底部版权信息"),
("seo_title", "民众智创 - AI视频生成平台", "SEO标题"),
("seo_description", "专业的AI视频生成服务", "SEO描述"),
("seo_keywords", "AI视频,视频生成,人工智能", "SEO关键词"),
# Agreement configs
("user_agreement_url", "", "用户协议PDF"),
("privacy_policy_url", "", "隐私政策PDF"),
# Agreement config
("user_agreement_privacy_url", "", "用户协议及隐私政策PDF"),
# Payment configs
("payment_wechat_enabled", "false", "微信支付启用"),
("payment_wechat_mch_id", "", "微信商户号"),