Show WeCom machine name after brand title on shell and login.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -98,16 +98,27 @@ async def login(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/branding")
|
||||
async def branding() -> dict:
|
||||
"""登录页/顶栏展示用(无敏感信息):与企微通知同一机器名。"""
|
||||
from ..notify import wecom
|
||||
|
||||
return {"machine_name": wecom.wecom_machine_name() or ""}
|
||||
|
||||
|
||||
@router.get("/me")
|
||||
async def me(
|
||||
username: Annotated[str, Depends(require_user)],
|
||||
settings: Annotated[Settings, Depends(get_settings)],
|
||||
) -> dict:
|
||||
from ..notify import wecom
|
||||
|
||||
return {
|
||||
"username": username,
|
||||
"env_name": settings.env_name,
|
||||
"mode": settings.mode,
|
||||
"sim": settings.is_sim,
|
||||
"machine_name": wecom.wecom_machine_name() or "",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user