This commit is contained in:
root
2025-07-12 21:17:36 +08:00
parent cc33875d16
commit 3927c4ffb7
3 changed files with 29 additions and 20 deletions

View File

@@ -26,7 +26,7 @@ def register_user(
password: Optional[str] = typer.Option(None, "--password", "-p", help="密码(不提供则交互式输入)")
):
"""注册新用户"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 获取密码
if not password:
@@ -52,7 +52,7 @@ def login_user(
password: Optional[str] = typer.Option(None, "--password", "-p", help="密码(不提供则交互式输入)")
):
"""用户登录"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 获取密码
if not password:
@@ -75,7 +75,7 @@ def verify_token(
token: str = typer.Argument(..., help="JWT token"),
):
"""验证JWT token"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 验证token
result = auth_api.verify_token({
@@ -92,7 +92,7 @@ def list_users(
include_inactive: bool = typer.Option(False, "--include-inactive", "-i", help="包含非活跃用户"),
):
"""列出所有用户"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 获取用户列表
users = user_table.get_all_users(include_inactive)
@@ -105,7 +105,7 @@ def list_users(
@auth_app.command("stats")
def show_stats():
"""显示用户统计信息"""
response = create_response_handler(str(uuid4()))
response = create_response_handler()
try:
# 获取统计信息
stats = user_table.get_user_count()