chore: initialize GSREA website project
This commit is contained in:
commit
d3c5461de5
1842 files changed
+246140
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.db import get_db
|
||||
from app.models.content import settings_view
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
@router.get("/settings")
|
||||
def read_public_settings(db: Session = Depends(get_db)) -> dict:
|
||||
# 只返回门户展示字段。上传上限和登录锁定参数留在管理端。
|
||||
data = settings_view(db)
|
||||
return {
|
||||
"siteName": data["site_name"],
|
||||
"logoUrl": data["logoUrl"],
|
||||
"bannerUrls": data["bannerUrls"],
|
||||
"icpText": data["icp_text"],
|
||||
"policeText": data["police_text"],
|
||||
"friendLinks": data["friend_links"],
|
||||
"linkCirea": data["link_cirea"],
|
||||
"linkHousing": data["link_housing"],
|
||||
}
|
||||
Reference in new issue
Block a user