MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / update_token_refresh_enabled

Function update_token_refresh_enabled

src/api/admin.py:1655–1666  ·  view source on GitHub ↗

Update protocol ST refresh enabled; AT refresh remains always enabled.

(
    request: Optional[dict] = None,
    token: str = Depends(verify_admin_token)
)

Source from the content-addressed store, hash-verified

1653
1654@router.post("/api/token-refresh/enabled")
1655async def update_token_refresh_enabled(
1656 request: Optional[dict] = None,
1657 token: str = Depends(verify_admin_token)
1658):
1659 """Update protocol ST refresh enabled; AT refresh remains always enabled."""
1660 enabled = (request or {}).get("enabled")
1661 if enabled is not None:
1662 await db.update_token_refresh_config(enabled=bool(enabled))
1663 return {
1664 "success": True,
1665 "message": "刷新配置已更新"
1666 }
1667
1668
1669@router.post("/api/token-refresh/config")

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected